Part Number Hot Search : 
01912 RDC10320 SDB156L 2SK3158 23202 74CBTLV BZX55C82 TD6207
Product Description
Full Text Search
 

To Download IC-TW8-16 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  ic-tw8 16-bit sin/cos interpolator with auto-calibration rev c2, page 1/ 67 features input frequency of up to 125 khz binary/decimal interpolation factors from x0.25 to x16384 post-ab divider [1/1 to 1/32] allows fractional resolution differential sine/cosine input signal range of 20 mv to 1.4 v peak-peak automatic offset, gain match and phase correction simple automatic one-pin calibration easy confguration: by static pins (for generic abz output) advanced confguration: 1-wire interface, 3 and 4-wire spi (32 mhz), serial i 2 c eeprom pwm or abz quadrature encoder output signals incremental abz output to 8 mhz (32 mhz edge separation) position and velocity read-out (32 bit spi) sophisticated error handling and signal monitoring static 64 position lut to compensate for arbitrary sensor distortions supply voltage range of 3.1 v to 5.5 v extended temperature range of -40 to +125 c applications sine/cosine interpolation signal conditioning with auto calibration linear and rotary encoders flexible incremental encoder systems packages 48-pin qfn 7 mm x 7 mm rohs compliant block diagram copyright ? 2010, 2016 ic-haus http://www.ichaus.com dra_qfn48-7x7-2_pack_2, 2:1 sin- adc fault + status frame clock calib cos- cos+ outb vc vref xin xout zero+ zero- xrst adc outa outz sda scl wp eesel c1 c0 c2 c3 spi_sclk spi_xss spi_si spi_so dvdd avdd fab avss dvss ir config. ic-tw8 control spi pin interface pwm interface 1-wire master eeprom quadrature generator signal driver crystal bandgap reset memory digital processing sin+ _ + _ + _ pinsel
ic-tw8 16-bit sin/cos interpolator with auto-calibration rev c2, page 2/ 67 description the ic-tw8 is a 16-bit application-specifc dsp inter- polator for sine/cosine signals with automatic calibra- tion and adaption of signal path parameters during operation to maintain minimum angular error and jit- ter. angular position is calculated at a programmable resolution of up to 65,536 increments per input cycle. automatic calibration and adaption (correction during operation) of sensor offset, sin/cos amplitude match, and phase quadrature is provided. additionally, a 64-byte lookup table (lut) is available to correct for residual harmonic distortion in the sensor signals. the ic-tw8 accepts 10 mv to 700 mv differential sin/- cos input signals directly from magnetic or optical sensors C no external signal conditioning is required in most applications. the differential zero (reference) input accepts a wide range of digital and analog index gating sources such as hall or mr sensor bridges. the z output width, position relative to the sin/cos inputs, and synchronization to the ab quadrature out- puts is fully programmable. in addition to industry-standard incremental abz quadrature output, the ic-tw8 provides optional pwm (potentiometer) and serial-only (spi or 1-wire) output modes for special or imbedded applications. the incremental abz quadrature output can be gen- erated at a frequency of up to 8 mhz (31 ns edge spacing); the maximum output frequency can also be limited so as not to overwhelm connected counters. in pwm output mode, the ic-tw8 provides a differen- tial pulse-width modulated signal proportional to the calculated angle (position) of the sin/cos inputs. an rc flter may be used to provide an analog voltage output for potentiometer applications, or to drive an external adc for simple single-turn absolute applica- tions. synchronous digital flters may be implemented using an external microcontroller or fpga for more sophisticated or imbedded applications. in serial-only output mode, the ic-tw8s internal 32-bit position counter and instantaneous angular ve- locity register can be read via the built-in spi or 1-wire serial ports at clock rates of up to 32 mhz. higher input signal frequencies are allowed in serial-only out- put mode since the abz output frequency limitation is not applicable. the ic-tw8 offers two confguration modes. pin con- fguration mode provides simple, static confguration that does not require any programming or complicated calibration. pin confguration mode uses a subset of the ic-tw8s complete capabilities including abz quadrature output, a limited choice of the most com- monly used interpolation (resolution) and hysteresis values, and one-button calibration. eight resistors set voltage levels at four confguration input pins to select all operating parameters, simplifying product assembly. one-button auto calibration sets input gain and compensates sensor offset and sin/cos channel gain match and phase with just a few input cycles and then stores the compensation values to eeprom. in more sophisticated applications, serial confgura- tion mode allows access to all ic-tw8 features. com- plete device confguration using the bi-directional spi or 1-wire serial ports provides access to all resolu- tions (including fractional interpolation), the sensor distortion lut, fully programmable hysteresis, and advanced noise/jitter fltering, quality monitoring, and fault detection capabilities. the ic-tw8 requires only two external components for operation, a serial eeprom for storage of con- fguration and calibration data, and a clock oscillator or crystal. an internal rc oscillator is provided for cost-sensitive applications. split analog and digital power supply inputs allow optimal fltering for noisy industrial environments. an integrated power-on re- set circuit can be overridden by an external hardware reset signal if necessary.
ic-tw8 16-bit sin/cos interpolator with auto-calibration rev c2, page 3/ 67 contents packaging information 4 pin configuration qfn48-7x7 (topview) . . . . . . . . . . . . . . . . . 4 package dimensions . . . . . . . . . . . 5 pin functions . . . . . . . . . . . . . . . 6 absolute maximum ratings 8 thermal data 8 electrical characteristics 9 operating requirements 12 spi interface . . . . . . . . . . . . . . . . . . 12 1-wire interface . . . . . . . . . . . . . . . . 12 additional information 14 design review: function notes 14 revision history 15 attachments 17 pc: description of pin confguration mode . 17 sc: description of serial confguration mode 32
ic-tw8 16-bit sin/cos interpolator with auto-calibration rev c2, page 4/ 67 packaging information pin configuration qfn48-7x7 (topview) pin functions no. name function 38 avdd +3.1 v to 5.5 v analog supply voltage avdd and dvdd can be powered either mutually or separately but must be the same voltage. 46 avss analog ground avss must be connected to dvss ex- ternally. 21 dvdd +3.1 v to 5.5 v digital supply voltage 15 dvss digital ground tp connect the backside paddle to a ground plane which must have avss potential. ... other refer to the pin function table for a de- tailed description.
ic-tw8 16-bit sin/cos interpolator with auto-calibration rev c2, page 5/ 67 package dimensions 7 7 top 0.90 0.10 side 5.55 5.55 0.50 0.22 0.40 bottom 5.55 5.55 6.90 6.90 0.30 0.50 r0.15 0.70 recommended pcb-footprint drb_qfn48-7x7-2_pack_1, 8:1 all dimensions given in mm. tolerances of form and position according to jedec mo-220.
ic-tw8 16-bit sin/cos interpolator with auto-calibration rev c2, page 6/ 67 pin functions no. name i/o function description 1 nc pin has no connection to die. connect to dvss on pcb. 2 xrst digital in, low active, 40 k ? pull-up reset input the device is held in reset as long as xrst is low. for operation at 5 v, connect 68 k ? to dvss (changes the pow- er-on-reset threshold to approx. 4 v). refer to section power-on-reset and startup for more information on reset. 3 fab digital in, 5 k ? pull-down test enable input fabrication test is enabled when pin is high during reset. this pin must be connected to dvss for normal operation. 4 eesel digital in, 150 k ? pull-down selection input pin must be tied low. 5 calib digital in, 10 k ? pull-up, hysteresis calibration control device enters calibration mode on falling edge of calib. adaptation parameters are written to the external eeprom on rising edge of calib. this pin should be left foating or connected to dvdd if not used. 6 clock digital in/out, 150 k ? pull-down clock output the pin is a programmable clock output that can be used for pwm synchronization. a connection to dvss is advisable when not in use. 7 ir digital in/out, 150 k ? pull-up 1-wire interface i/o pin is bi-directional. refer to programmers reference for more details. 8 frame digital in/out, 150 k ? pull-down sync output this pin outputs the internal adc sampling clock, which can be used to synchronize downstream circuits. a connection to dvss is advisable when not in use. 9 spi_so digital out spi slave output pin directly connects to an spi master mi pin. 10 spi_si digital in spi slave input pin directly connects to spi master mo pin. this pin should be tied to dvss if the spi is not used. 11 spi_sclk digital in, with hysteresis spi slave clock input pin connects to spi master clock output. the input implements hys- teresis to avoid double triggering. this pin must be tied to dvss if the spi is not used. 12 nc these pins have no connection to die. connect to dvss on pcb. 13 nc 14 spi_xss digital in, low active spi slave select input in 4-pin spi mode this pin directly connects to the spi master slave select output. in case the spi is operated in 3-pin mode, spi_xss must be tied low to dvss. this pin is not debounced or fltered. a noise-free ground connection is essential to avoid spi_so tri-stating during communication. if the spi is not used, this pin should be tight to dvdd or dvss. 15 dvss ground digital ground pin must tie to high quality ground, usually a solid pcb plane. 16 outz digital out z output quadrature interface reference output. 17 outb digital out b output pwm- output z window in quadrature mode this is output b. in pwm mode this is pwm-, the inverted output of outa. in z calibration mode (bit rb_test1.z_test = 1) this is the z window seen just after the input comparator. 18 outa digital out a output pwm+ output z window in quadrature mode this is output a. in pwm mode this is pwm+. in z calibration mode (bit rb_test1.z_test = 1) this is the z window used to gate the z output. 19 status digital out pwm status output this pin provides proportional status information. pin can drive a 10 ma led and is widely confgurable. refer to section monitoring interpolation quality for details. 20 fault digital out error status output pin is low on error and is capable of driving a 10 ma led. the error response can be confgured as detailed in section fault handling for details. 21 dvdd supply digital power supply +3.1 v to +5.5 v supply voltage terminal. dvdd and avdd must be the same voltage level (5 v or 3.3 v). 22 pinsel digital in, 150 k ? pull-down confguration mode selection tie pin to dvss to enable serial confguration mode. tie pin to dvdd to select pin confguration mode. 23 nc these pins have no connection to die. connect to dvss on pcb. 24 nc 25 nc 26 reserved connect this pin to dvss on pcb.
ic-tw8 16-bit sin/cos interpolator with auto-calibration rev c2, page 7/ 67 pin functions no. name i/o function description 27 scl digital in/out, 10 k ? pull-up eeprom clock line this pin connects to the eeprom scl pin. no external i2c pull-up resistor is required as 10 k ? is integrated. 28 sda digital in/out, 10 k ? pull-up eeprom data line this pin connects to the eeprom sda pin. no external i2c pull-up resistor is required as 10 k ? is integrated. 29 wp digital out eeprom write protection this pin acts as the write protect signal and connects to the eeprom wp pin. no external pull-up is required as this pin is a push-pull output actively driving low and high. 30 c0 analog in confguration inputs if the pin confguration mode is used (pin pinsel tied high), each pin functions as 12-level confguration input. if serial confguration mode is used (pin pinsel tied low), connect these pins to dvss on pcb. 31 c1 32 c2 33 c3 34 xout analog in/out crystal terminal pin should be tied to avss if no crystal is used. an external oscillator or other square wave clock source can be used to drive this pin. refer to providing a clock. 35 xin analog in crystal terminal pin must be tied to avss if no crystal is used. 36 nc these pins have no connection to die. connect to dvss on pcb. 37 nc 38 avdd supply analog power supply +3.1 v to +5.5 v supply voltage terminal. keep it clean! dvdd and avdd must be the same voltage level (5 v or 3.3 v). 39 sin+ analog in sine input + differential sine signal input. for single ended sensors sin- must be biased to an appropriate dc level. 40 sin- analog in sine input - 41 cos+ analog in cosine input + differential cosine signal input. for single ended sensors cos- must be biased to an appropriate dc level. 42 cos- analog in cosine input - 43 nc pin has no connection to die. connect to dvss on pcb. 44 vc analog out bias output decouple with 1 f capacitor to avss. do not inject noise into this pins as it directly impacts adc conversion noise. 45 vref analog out bias output decouple with 1 f capacitor to avss. do not inject noise into this pin as it directly impacts adc conversion noise. 46 avss ground analog ground pin must be tied to high quality ground, usually a solid pcb plane. 47 zero+ analog in zero input + differential zero gating input. if single ended signal sources are used, the unused terminal (either zero+ or zero-) must be tied to an appropriate dc bias. 48 zero- analog in zero input -
ic-tw8 16-bit sin/cos interpolator with auto-calibration rev c2, page 8/ 67 absolute maximum ratings these ratings do not imply operating conditions; functional operation is not guaranteed. beyond these values damage may occur. item symbol parameter conditions unit no. min. max. g001 dvdd, avdd voltage at dvdd, avdd referenced to avss -0.3 6 v g002 dvdd difference voltage between dvdd and avdd -0.3 +0.3 v g003 dvss difference voltage between dvss and avss -0.3 +0.3 v g004 vpin pin voltage at any pin versus avss referenced to avss -0.3 avdd + 0.5 v g005 ipin input current at any pin, except avdd, avss, dvdd, dvss -10 10 ma g006 vesd1 esd susceptibility of signal input pins hbm, 100 pf discharged through 1.5 k ? ; 2 kv pins sin+, sin-, cos+, cos-, zero+, zero- g007 vesd2 esd susceptibility of remaining pins hbm, 100 pf discharged through 1.5 k ? 2 kv g008 tj junction temperature -40 150 c g009 ts storage temperature -40 150 c thermal data item symbol parameter conditions unit no. min. typ. max. t01 ta operating ambient temperature range -40 125 c t02 rthja thermal resistance chip to ambient qfn48 surface mounted to pcb according to jedec 51 30 k/w all voltages are referenced to pin avss unless otherwise stated. all currents fowing into the device pins are positive; all currents fowing out of the device pins are negative.
ic-tw8 16-bit sin/cos interpolator with auto-calibration rev c2, page 9/ 67 electrical characteristics operating conditions: avdd = dvdd = 3.1...5.5 v, tj = -40...+125 c, reference point avss unless otherwise stated item symbol parameter conditions unit no. min. typ. max. total device 001 avdd, dvdd permissible supply voltage avdd, dvdd 3.1 5.5 v 002 idd total supply current in avdd and dvdd fn = 1 khz, increments 4096, post-ab divider 1, error-free boot-up from eeprom; vdd = 5 v, 32 mhz crystal 25 35 ma vdd = 3.3 v, 20 mhz crystal 12 20 ma signal inputs and amplifers: sin+, sin-, cos+, cos- 101 vin() permissible input voltage range refer to figure 1 1.4 avdd - 1.0 v 102 v in () permissible input amplitude refer to figure 1 700 mvpp 103 v in ()diff permissible input amplitude, differential 1.4 vpp 104 vos() amplifer input offset voltage 15 mv 105 iin() input leakage current 50 na 107 offcorr correctable input offset voltage as percentage of input signal amplitude; input offset voltage is the sum of sensor offset plus amplifer offset (item 104); 100 % 108 acorr correctable sin/cos amplitude mismatch max(asin, acos) / min(asin, acos), whereas asin and acos are the sin/cos input ampli- tudes respectively. 1.24 109 phicorr correctable sin/cos phase error (step size 0.052 degree) 53 deg 110 rpu() pull-up resistor at sin+, cos+ main_cfg.pull = 1 3 m ? 111 rpd() pull-down resistor at sin-, cos- main_cfg.pull = 1 3 m ? index signal inputs and amplifer: zero+, zero- 201 vin() permissible input voltage 0 avdd v 202 vos() input referred offset voltage 15 mv 203 iin() input leakage current 50 na converter performance 301 inl integral nonlinearity refer to figure 3 , 1 vpp-diff sin/cos input with compensated offset, gain and phase 0.08 deg 302 dnl differential nonlinearity refer to figure 3 , 1 vpp-diff sin/cos input with compensated offset, gain and phase 0.02 deg 303 n output angle noise 1 vpp-diff sin/cos input, fn = 0 hz 0.08 deg 305 tp()io input-to-output latency fosc = 32 mhz; main_fltr.fb = 0 (lag recovery disabled) 24 s main_fltr.fb = 1 (lag recovery enabled) 4 s fosc = 24 mhz; main_fltr.fb = 0 (lag recovery disabled) 32 s main_fltr.fb = 1 (lag recovery enabled) 5.3 s clock: xin, xout 401 fxtl permissible external frequency driven into xout avdd, dvdd = 5 v 6 32 mhz avdd, dvdd = 3.3 v 6 24 mhz 402 fosc internal oscillator frequency avdd, dvdd = 5 v, permissible maximum 32 mhz tj = 27 c, main_clock.freq = 0 20 mhz avdd, dvdd = 3.3 v, permissible maximum 24 mhz tj = 27 c, main_clock.freq = 0 18 mhz 403 tcosc internal oscillator temperature dependancy avdd, dvdd = 5 v -0.07 %/k avdd, dvdd = 3.3 v -0.09 %/k 404 vcosc internal oscillator power supply dependancy 1.18 mhz/v
ic-tw8 16-bit sin/cos interpolator with auto-calibration rev c2, page 10/ 67 electrical characteristics operating conditions: avdd = dvdd = 3.1...5.5 v, tj = -40...+125 c, reference point avss unless otherwise stated item symbol parameter conditions unit no. min. typ. max. reset and start-up: xrst 601 dvddon dvdd reset threshold increasing voltage at dvdd; xrst tied to dvdd 2.7 v xrst connected through 68 k ? to dvss 4.0 v 602 vt()hi input logic threshold high increasing voltage at xrst 2.7 v 603 vt()lo input logic threshold low 0.8 v 604 rpu() pull-up resistor v() = 0 ... dvdd - 1 v 40 k ? 605 tstart startup time avdd, dvdd = 5 v, fxtl = 24 mhz by crystal; pin confguration (eeprom connected) 100 ms ready for serial confguration: eeprom connected 100 ms no eeprom, sda = avss 10 ms no eeprom, sda = avdd 100 ms 606 td()lo low-level duration for reset triggering v(xrst) < vt(xrst)lo 10 ns digital input pins: eesel, calib, clock, ir, frame, spi_si, spi_sclk, spi_xss, pinsel, scl, sda, fab 701 vt()hi input logic threshold high dvdd = 5 v 2.2 v dvdd = 3.3 v 2.2 v 702 vt()lo input logic threshold low dvdd = 5 v 0.8 v dvdd = 3.3 v 0.8 v 703 vt()hi input logic threshold high calib, spi_sclk dvdd = 5 v 3.75 v dvdd = 3.3 v 2.47 v 704 vt()lo input logic threshold low calib, spi_sclk dvdd = 5 v 0.75 v dvdd = 3.3 v 0.49 v 706 ilk() input leakage current at spi_si, spi_sclk, spi_xss 50 na 707 rpu() pull-up resistor at ir 150 k ? 708 rpu() pull-up resistor at calib, scl, sda 10 k ? 709 rpd() pull-down resistor at eesel, clock, frame, pinsel 150 k ? 710 rpd() pull-down resistor at fab 4 k ? 711 tstore required calib wait time for parameter storage to eeprom writing of 150 bytes after calib lo hi; for eeprom with write time of 5 ms 770 ms for eeprom with write time of 2 ms 320 ms digital output pins: clock, ir, frame, spi_so, outa, outb, outz, status, fault, scl, sda, wp 801 vs()hi output voltage high pins scl, sda excluded; dvdd = 5 v, iout = 4 ma 4.4 v dvdd = 3.3 v, iout = 4 ma 2.7 v 802 vs()lo output voltage low dvdd = 5 v, iout = -4 ma 0.45 v dvdd = 3.3 v, iout = -4 ma 0.45 v 803 idc()max permissible output dc load per pin 10 ma 804 idcmax permissible total output dc load for all output pins in aggregate 60 ma 805 tr() rise time dvdd = 5 v, cl = 50 pf 50 ns dvdd = 3.3 v, cl = 50 pf 30 ns 806 tf() fall time dvdd = 5 v, cl = 50 pf 50 ns dvdd = 3.3 v, cl = 50 pf 30 ns 807 fclk(scl) scl clock frequency i2c access to eeprom on power up 100 khz after confguration, max. at fosc = 32 mhz fosc/128 250 khz 808 twhi duty cycle at outa, outb referred to period t, see fig. 2 50 % 809 tab output phase outa vs. outb referred to period t, see fig. 2 25 % 810 tmtd minimum edge distance at outa vs. outb fcore = fxtl or fosc, ab_cfg1.div = 0, ab_vtop = 0, see fig. 2 1/fcore
ic-tw8 16-bit sin/cos interpolator with auto-calibration rev c2, page 11/ 67 electrical characteristics operating conditions: avdd = dvdd = 3.1...5.5 v, tj = -40...+125 c, reference point avss unless otherwise stated item symbol parameter conditions unit no. min. typ. max. bias outputs: vc, vref 901 vc bias voltage at vc i(vc) = 0 50 %vdd 902 dvref bias voltage at vref versus vc dvref = v(vref) - v(vc); i(vref) = 0 -1 v confguration inputs: c0, c1, c2, c3 a01 ilk() input leakage current 1 a figure 1: permissible input voltage range (@5 v -10%, and @3.3 v -5%) figure 2: description of ab output signals. figure 3: defnition of integral and differential nonlin- earity. 5v 3v 2v 4v 1.4 v 3.5 v 1v vcm 1.75v vcm 3.15v 1.4 v 2.1 v vdd= 4.5 v vdd= 3.1 v 350 mvpeak max. vcm 1.75v 350 mvpeak max. v in a b t ab t mtd t whi t aarel aarel 0 360 180 converter error inl : the maximum absolute error . dnl : the maximum step between two consecutive samples . ideal converter actual converter angular position
ic-tw8 16-bit sin/cos interpolator with auto-calibration rev c2, page 12/ 67 operating requirements: spi interface operating conditions: avdd = dvdd = +3.1 ... +5.5 v, avss = dvss = 0 v, tj = -40...125 c item symbol parameter conditions unit no. min. max. spi interface timing i001 txss_set setup time: spi_xss hi lo before spi_sclk lo hi 15 ns i002 txss_hold hold time: spi_xss lo after spi_sclk lo hi 25 ns i003 txss_hi spi_xss signal duration hi 15 ns i004 tsi_set setup time: spi_si stable before spi_sclk lo hi 5 ns i005 tsi_hold hold time: spi_si stable after spi_sclk lo hi 10 ns i006 f(sclk) spi_sclk clock frequency avdd = dvdd = +4.5 ... +5.5 v, fosc = 32 mhz 24 mhz avdd = dvdd = +3.1 ... +5.5 v, fosc = 24 mhz 20 mhz i007 tc_hi spi_sclk signal duration hi 10 ns i008 tc_lo spi_sclk signal duration lo 10 ns i009 tso_p propagation delay: spi_so stable after spi_sck hi lo 20 ns i010 tso_p2 propagation delay: spi_so high impedance after spi_xss lo hi 20 ns figure 4: spi write timing. figure 5: spi read timing. s p i _ s c l k s p i _ xs s l s b o u t s p i _ s o t c _ h i t c _ lo t xs s _ h o ld t s o _ p t s o _ p 2 t s o _ p m s b o u t s p i _ s c l k s p i _ s i s p i _ xs s t r is t a t e l s b in s p i _ s o t c _ h i t c _ lo t xs s _ h o ld t s i _ h o ld t s i _ s e t t xs s _ s e t t xs s _ h i t xs s _ h i m s b in s p i _ s i d o n ?t c a r e in p u t in p u t in p u t o u t p u t in p u t in p u t in p u t o u t p u t s p i _ s c l k s p i _ xs s l s b o u t s p i _ s o t c _ h i t c _ lo t xs s _ h o ld t s o _ p t s o _ p 2 t s o _ p m s b o u t s p i _ s c l k s p i _ s i s p i _ xs s t r is t a t e l s b in s p i _ s o t c _ h i t c _ lo t xs s _ h o ld t s i _ h o ld t s i _ s e t t xs s _ s e t t xs s _ h i t xs s _ h i m s b in s p i _ s i d o n ?t c a r e in p u t in p u t in p u t o u t p u t in p u t in p u t in p u t o u t p u t
ic-tw8 16-bit sin/cos interpolator with auto-calibration rev c2, page 13/ 67 operating requirements: 1-wire interface operating conditions: avdd = dvdd = +3.1 ... +5.5 v, avss = dvss = 0 v, tj = -40...125 c item symbol parameter conditions unit no. min. max. 1w-interface timing i101 t start low time start condition 2 ms i102 t long unit time long 50 500 s unprogrammed eeprom 100 s i103 t short unit time short 25 t long - 25 s unprogrammed eeprom 50 s i104 t idle interface idle before new access 100 s i105 t delay_ic memory read delay by ic ic-tw8 returning data t short / 2 t short i106 t long_ic unit time long by ic ic-tw8 returning data t long / 2 t long i107 t short_ic unit time short by ic ic-tw8 returning data t short / 2 t short figure 6: 1-wire interface timing (pwm bit stream). t long t short t short t long 10 start idle t start delay t short t delay_ic idle t idle 10 t short_ic t long_ic t long_ic
ic-tw8 16-bit sin/cos interpolator with auto-calibration rev c2, page 14/ 67 additional information documentation ? pin confguration manual: refer to attachment pc ? serial confguration manual: refer to attachment sc ? programmers reference: available on request, please contact ic-haus applications engineering. ? evaluation board description ic-tw8 eval tw8_1d: refer to ic-haus website for download. ? gui software: refer to ic-haus website for download. design tools ? rotary encoder design tool (excel spreadsheet): available on request, please contact ic-haus applications engineering. application notes ? (under preparation) design review: function notes ic-tw8 c1 no. function, parameter/code description and application notes 1 look-up table: adpt_cfg.lut the distortion look-up table is not featured by chip release c1; mandatory programming: adpt_cfg.lut = 0 table 7: notes on chip functions regarding ic-tw8 chip release c1. ic-tw8 d1, d2, d3 no. function, parameter/code description and application notes 1 adaption quality monitoring: mon_cfg.adapt if enabling adaption quality monitoring, note that this reduces the permissible adaption limits and quality thresholds for mon_off, mon_gain, and mon_phase (allowed maximum value is 7 instead of 12). refer to the programmers reference for further details. 2 adc underfow: stat_sp.adcuf this status error is initially raised on startup because the signal amplitude (frst adc_amp value) has not been calculated yet. 3 adc fault enable: flt_en.adc do not enable latching (freezes adc underfow status raised on startup). if latching adc overfow and underfow conditions is essential to the system, use an external mcu to set the flt_en.adc after startup has been completed. 4 32-bit position counter reset: main_z.reset to reset the 32-bit position counter by an index signal, use main_z.reset = 1 to reset whenever the z output is active. do not use main_z.reset = 2 to reset by the zero input signal (as described in previous datasheet releases), as this may cause invalid data for spi output and spurious ab output bursts. table 8: notes on chip functions regarding ic-tw8 chip releases d1, d2, d3 ic-tw8 d4 no. function, parameter/code description and application notes none at time of printing (related to this datasheet release). table 9: notes on chip functions regarding ic-tw8 chip release d4.
ic-tw8 16-bit sin/cos interpolator with auto-calibration rev c2, page 15/ 67 revision history rel. rel. date ? chapter modifcation page a1 2012-11-22 all chapters and attachments initial release all rel. rel. date ? chapter modifcation page a2 2013-01-29 attachments attachments pc and sc updated all rel. rel. date ? chapter modifcation page b1 2014-03-17 packaging information drawing added for package dimensions and recommended footprint 5 electrical characteristics item 002: max. values supplemented; item 101: fig. 1 added; item 402: typ. value; item 602: max. value, 605: typ. value supplemented; item 801: pins sda and scl excluded; 802: max. value and unit; items 800ff: with ir and scl as outputs; items 102, 703, 704, 807 introduced as new items (former 703 excluded); 9-10 operating requirements: 1-wire interface interface timing supplemented 13 additional information list supplemented 14 ordering information board size corrected, redt download link removed; 16 attachments attachments pc and sc updated 17ff rel. rel. date ? chapter modifcation page c2 2016-08-18 packages package drawing updated pin 14, spi_xss: note added. 5, 6 absolute maximum ratings items g006, g007: esd ratings supplemented 8 electrical characteristics items 103, 305, 403, 404, 606, 808, 809, 810: added as new items item 104: max value, item 110, 111: typ. value, item 202: max value item 402: max value supplemented item 710: typ. value, new item 711 added item 901, 902: conditions corrected group a introduced for pins c0, c1, c3, c4 (removed from group 7) 9ff operating require- ments: spi interface item i006: supplemented specifcation items i009, i010: max. value 12 operating require- ments: 1-wire interface items i102, i103: conditions and values supplemented 13 design review: function notes new entries for chip releases d1 to d3 chip release d4 supplemented 14 attachments attachment pc and sc updated 17ff ic-haus expressly reserves the right to change its products and/or specifcations. an info letter gives details as to any amendments and additions made to the relevant current specifcations on our internet website www.ichaus.com/infoletter ; this letter is generated automatically and shall be sent to registered users by email. copying C even as an excerpt C is only permitted with ic-haus approval in writing and precise reference to source. ic-haus does not warrant the accuracy, completeness or timeliness of the specifcation and does not assume liability for any errors or omissions in these materials. the data specifed is intended solely for the purpose of product description. no representations or warranties, either express or implied, of merchantability, ftness for a particular purpose or of any other nature are made hereunder with respect to information/specifcation or the products to which information refers and no guarantee with respect to compliance to the intended use is given. in particular, this also applies to the stated possible applications or areas of applications of the product. ic-haus products are not designed for and must not be used in connection with any applications where the failure of such products would reasonably be expected to result in signifcant personal injury or death (safety-critical applications) without ic-haus specifc written consent. safety-critical applications include, without limitation, life support devices and systems. ic-haus products are not designed nor intended for use in military or aerospace applications or environments or in automotive applications unless specifcally designated for such use by ic-haus. ic-haus conveys no patent, copyright, mask work right or other trade mark right to this product. ic-haus assumes no liability for any patent and/or other trade mark rights of a third party resulting from processing or handling of the product and/or any other use of the product. ? release date format: yyyy-mm-dd
ic-tw8 16-bit sin/cos interpolator with auto-calibration rev c2, page 16/ 67 ordering information type package options order designation ic-tw8 48-pin qfn, 7 mm x 7 mm, thickness 0.9 mm, rohs compliant ic-tw8 qfn48-7x7 evaluation board pcb, 120 mm x 100 mm ic-tw8 eval tw8_1d pc-usb adapter only required if the evaluation board needs to be operated by the gui. ic-mb3 icsy mb3u-i2c ic-tw8 gui evalutation software for windows pc (entry of ic parameters, fle storage, and transfer to dut) for download link refer to www.ichaus.com/tw8 encoder design tool excel-based rotary encoder design tool for parameter defnition. check www.ichaus.com/tw8 for download link or contact ic-haus applications engineering. please send your purchase orders to our order handling team: fax: +49 (0) 61 35 - 92 92 - 692 e-mail: dispo@ichaus.com for technical support, information about prices and terms of delivery please contact: ic-haus gmbh tel.: +49 (0) 61 35 - 92 92 - 0 am kuemmerling 18 fax: +49 (0) 61 35 - 92 92 - 192 d-55294 bodenheim web: http://www.ichaus.com germany e-mail: sales@ichaus.com appointed local distributors: http://www.ichaus.com/sales_partners
ic - tw8 16- bit sin/cos interpolator pin configuration mode aug 3 , 2016 page pc 1/ 15 copyright ?2011 2016 ic - haus www.ichaus.com table of contents about this document ...................................................................................................................................... 2 functional overview ........................................................................................................................................ 2 electrical connections ...................................................................................................................................... 3 connecting the incremental sensor ............................................................................................................... 4 connecting an index sensor (if used) ........................................................................................................... 5 connecting the eeprom .............................................................................................................................. 5 power - on- reset .............................................................................................................................................. 6 providing a clock ........................................................................................................................................... 6 connecting the abz outputs ......................................................................................................................... 7 power - up sequence .......................................................................................................................................... 7 pin configuration ............................................................................................................................................. 8 setting the interpolation factor ...................................................................................................................... 9 setting the auto - adaption mode ................................................................................................................... 9 setting the filter mode and hysteresis ........................................................................................................ 10 setting the maximum ab frequency and lag recovery ............................................................................ 11 serial interfaces .............................................................................................................................................. 11 auto calibration ............................................................................................................................................. 12 ic - tw8 rotary encoder design tool .......................................................................................................... 12 pin configuration reference ......................................................................................................................... 14 revision history .............................................................................................................................................. 15
ic - tw8 16- bit sin/cos interpolator pin configuration mode aug 3 , 2016 page pc 2/ 15 copyright ?2011 2016 ic - haus www.ichaus.com about this document this document describes the pin configuration mode of the ic - tw8 i nterpolator. pin - configuration mode provides simple, static configuration of the device without any programming or complicated calibra- tion. pin configuration allows selection of only the most commonly used features of the device . access to all features of the ic - tw8 is available in serial confi g- uration mode, describ ed in a separate document. design tools for both rotary and linear encoders u s- ing the ic - tw8 are available. these tools are in the form of excel spreadsheets that allow entering a p- plication parameters in engineering units and then provide performance limits and graphs, configur a- tion resistor values, and jumper settings for use with the ic - tw8 tw8_1d demonstration board. this greatly simplifies and speeds up the design process of encoders using the ic - tw8. functional overview the ic - tw8 is a general - purpose 16 - bit sin/cos interpolat or with sophisticated auto - calibration fun c tions . it accepts 20mv to 1.4v peak - to - peak differential analog input signals from magnetic or optical sensors and calculates (interpolates) the a n- gular position. o utput is industry - standard incr e- mental ab quadrature at programmable resolution . s imple pin configuration and one - step automatic calibra tion requires no complicated signal analysis or calibration procedu re during product design or production . in addition to the chosen sensor, t he ic - tw8 r e- quires an external eeprom to store its configur a- tion and calibration data. an external crystal can be used instead of the internal oscillator of the ic - tw8 for superior frequency stability. a differential line driv er can be connected directly to the ic - tw8 quadrature outputs to make a complete encoder. figure 1: ic - tw8 functional overview out a outb outz zero cos sin interpolation factor of x5 shown index pulse is suppressed as zero is low.
ic - tw8 16- bit sin/cos interpolator pin configuration mode aug 3 , 2016 page pc 3/ 15 copyright ?2011 2016 ic - haus www.ichaus.com electrical connections the basic electrical connections for an encoder u s- ing the ic - tw8 are shown in figure 2 . other than the analog sensor, only an eeprom for parameter storage, eight configuration resistors, and a few b y- pass capacitors are required for operation. pinsel (pin 22) must be connected to dvdd to sele ct pin configuration mode. a voltage regulator t o supply clean power to the device and a line driver are rec- ommended. an crystal or oscillator (clock driver) is also recommended . the ic - tw8 requires a high quality ground and clean power supplies . analog ground ( avss = pin 46) and digital ground ( dvss = pin 15) must both be connected on the pcb to a solid ground plane. analog power (avdd = pin 38) and digital power ( dvdd = pin 21) inputs must be connected to a low impedance 5v or 3.3v power source , prefer ably an on- board voltage regulator . in addition, avdd and dvdd should each have a dedicated 1 f deco u- pling capacitor placed as close to the power pins on the device as possible. if the ic - tw8 is used with a line driver ( such as the ic - hd7 or ic - hx ) or a high frequency fpga , it is especially important to isolate the ic - tw8 pow er inputs (avdd and dvdd) against external noise . in such applications, a dual voltage regulator such as the ic - dc is highly recommended. note that both avdd and dvdd must be the same voltage level (5v or 3.3v). figure 2 : ic - tw8 electrical connections (pin configuration mode) both pin vc (pin 44) and vref (pin 45) must be decoupled to ground with 1 f each as shown . the eeprom and the line driver (if used) must be d e- coupled according to their respective requirements. the calibration button provides an easy means to activate the auto - calibration feature of the ic - tw8 to set the data path parameters (offset, gain, and phase) to their optimal values. all pins not explicitly shown in figure 2 should be c onnected to appropr i- ate levels as indicated under pin functions in the ic - tw8 data sheet . vref vc 1f 1f 1f avdd avss vdd_tw8 1f dvdd eesel vdd_tw8 sin+ sin cos+ cos 10f vdd_tw8 vdd_main out a outb outz regulator line driver mr sensor ic-tw8 scl sda scl sda eeprom 24aa02 vdd_tw8 c0 c1 c2 c3 8 configuration resistors calib calibration button pinsel dvss pinsel tied to dvdd for pin configuration mode eesel tied to dvss.
ic - tw8 16- bit sin/cos interpolator pin configuration mode aug 3 , 2016 page pc 4/ 15 copyright ?2011 2016 ic - haus www.ichaus.com connecting the incremental sensor the ic - tw8 connects directly to magnetic (such as the ic - sm2l or ic - sm5l ) or optical sensors providing differential sin/cos outputs as shown in figure 3 . signal amplitude (a) from all four se n- sor channels must be in the range of 5 350mv as shown in figure 4 for proper operation with the ic - tw8 . figure 3 : differential sensor connection figure 4 : differential sensor signal inputs single - ended sin/cos inputs can also be connected to th e ic - tw8 by connecting the sin and cos pins to the proper bias voltage as shown in figure 5 . since the ic - tw8 provides high - impedance signal inputs, a simple resis tive voltage divider can be used to gene r- ate the required bias voltage. for a mr sensors , it is recommended that the resistors of the bias generator match the a mr sensor bridge resistance to improve power supply noise rejection. no decoupling cap acitor should be used. figure 5 : single - ended sensor connection differential inputs should be used whenever possible to reject common mode distortions and provide i n- creased signal amplitude and im proved signal to noise ratio (snr). regardless of input configuration, the auto - calibration feature of the ic - tw8 is sufficient in most cases to compensate for any signal offset, gain , and phase di s- tortions without requiring any additional external components. sensor bridge 0 sensor bridge 1 sin+ sin- cos+ cos- ic-tw8 vdd 0 (vdd/2) sin+ sin- a ? 5mv a 350mv 0 180 360 sensor bridge 0 sensor bridge 1 sin+ sin- cos+ cos- ic-tw8 avdd resistive bias generator
ic - tw8 16- bit sin/cos interpolator pin configuration mode aug 3 , 2016 page pc 5/ 15 copyright ?2011 2016 ic - haus www.ichaus.com connecting an index sensor (if used) the ic - tw8 can interface to a wide range of i n- dex sensors or gating source s to provide an index or z output which is synchron ized with the ab outputs . di gi tal h all sensor s are often used for this purpose, as show n in figure 6. figure 6 : index sensor connection digital sensors (hall, mr, and others) typically provide an active - low signal via an open - drain output that pulls low in the presence of a magnetic field. connect an active - low (open drain) digital index sensor to the ic - tw8 zero input (pin 48) and connec t the zero+ input (pin 47) to a resi s- tive voltage divider set to the midpoint of the i n- dex sensor output voltage swing to provide good noise rejection. for active - high (open source) dig- ital index sensors, reverse the zero+ and zero connections . to guarant ee one and only one z output from the ic - tw8 over multiple sin/cos input cycles, the zero input signal must be roughly centered on (in phase with) the cos+ incremental sensor si g- nal and no larger than 1.5 sin/cos input cycles under all conditions. if no i ndex (z) output is required, connect zero+ (pin 47) to ground and zero (pin 48) to avdd. analog - output index sensors can also be used with the ic - tw8, but only in spi/1 - wire config u- ration mode. connecting the eeprom the ic - tw8 requires a 24xx02 through 2 4xx16 fam i- ly i 2 c eeprom for storage of sensor calibration data (offset, gain, etc.) . the selected eeprom must ope r- ate down to 1.8v; the microchip 24a02 is reco m- mended. the eeprom connects directly to the ic - tw8 via a dedicated i 2 c communication channel us ing scl (pin 27) and sda (pin 28) as shown in figure 7 . n o exte r- nal pull - up resistors are required. eesel (pin 4) of the tw8 must also be connected to dvss as shown. figure 7 : eeprom connection in pin configuration mode, the write protect (wp) input of the eeprom is not controlled by the ic - tw8. wp must be grounded (disabled) during confi g- uration to allow the ic - tw8 to write the auto - adapted parameters to the eeprom. in operation, wp can be left grounded (write protection disabled) as shown in figure 7, or connected to dvdd by additional circui t- ry (such as a jumper) for parameter protection. zero+ zero- v dd ic-tw8 digital hall active low v dd sda wp 1f dvdd dvss vdd sda wp eeprom 24xx ic-tw8 scl scl 1f vdd vcc vss eesel eesel tied to dvss.
ic - tw8 16- bit sin/cos interpolator pin configuration mode aug 3 , 2016 page pc 6/ 15 copyright ?2011 2016 ic - haus www.ichaus.com power-on-reset the ic - tw8 contains a built - in power - on- reset (por) circuit that controls the safe start - up of the device. the internal por can be configured for two thresholds , 2.7v for use with 3.3v supplies or 4v, whi ch is recommended when operating the ic - tw8 at 5v . connect xrst (pin 2) dvdd or leav e it unconnected (xrst has an internal 40k pullup resistor to dvdd) to select a power - on- reset threshold of 2.7v . connect xrst to ground through a 68k resistor to select a threshold of 4v . an external reset source (such as an rc ci r cuit) can also be co n nected to xrst (pin 2) to d i rectly control the por behavior. figure 8: setting the power - on - reset threshold providing a clock the ic - tw8 supports three clocking modes as indicated in figure 9. while the ic - tw8 provides an internal oscillator, it cannot be tuned in pin configuration mode. thus, an external crystal or other clock source is recommended for all but the most cost - sensi tive applications. figure 9 : clocking an external crystal or oscillator provides the most stable clock signal over time and temperature varia- tions, resulting in the most consistent long - term ic - tw8 performance. connect an external crystal to xin (pin 35) and xout (pin 34) as shown in fi g- ure 9 . depending on the crystal characteristics, two capacitors to ground might be necessary for stable oscillation. to use an oscillator or ceramic reson a- tor, connect xin (pin 35) to ground and the oscill a- tor output to xout (pin 34) as shown in figure 9 . maximum crystal frequency ( f clock ) is 32 mhz with 5v supplies and 24 mhz with 3.3v sup plies . min i- mum frequency is 6 mhz regardless of supply vol t- age. to use the inte rnal oscillator, connect both xin (pin 35) and xout (pin 34) to ground as shown in fi g- ure 9 . the ic - tw8s internal oscillator h as a nom i- nal frequency of 20 mhz with 5v supplies and 16 mhz with 3.3v supplies. however, manufacturing tolerances and changes in temperature can cause large variations in the frequency of the internal o s- cillator. dvdd ic-tw8 xrst connect xrst to dvdd (or leave floating) for 2.7v por threshold. ic-tw8 xrst connect xrst to dvss via 68k resistor for 4v por threshold. 68k dvss xout xin ic-tw8 xout xin ic-tw8 xout xin ic-tw8 crystal clock inject internal oscillator
ic - tw8 16- bit sin/cos interpolator pin configuration mode aug 3 , 2016 page pc 7/ 15 copyright ?2011 2016 ic - haus www.ichaus.com connecting the abz outputs in pin configuration mode, t he ic - tw8 provides in dustry - standard quadrature incremental outputs at outa (pin 18) and outb (pin 17). if an index sensor is connected to t he zero inputs of the ic - tw 8, a z output synchronous with the ab ou t- puts is also available on outz (pin 16). the se output s can be directly connected to an encoder counter such as the ic - md . alternatively, the abz outputs can be connected t o a differential line driver (such as the ic - hd7 or ic - hx ) as shown in figure 10. when using a line driver it is especially important to isolate the ic - tw8 from external switching noise using a regu- lator, as shown . figure 10: line driver connection power-up sequence after power - up, the ic - tw8s por circuit monitors the supply voltage and waits until it has reached the appropriate threshold (as determined by the xrst connections). t he ic - tw8 then starts up using the internal oscillator ( even if a crystal or external clock so urce is connected) and executes its start - up cycle as outlined below. 1. r ead parameter values from eeprom. 2. set proper clock source and frequency . 3. read configuration inputs and enable signal path . 4. wait for all analog circuitry to settle . 5. clear all faults . 6. start abz output generation . if any faults are detected during the start - up cycle , the ic - tw8 does not enable the ab outputs but goes into an idle state with the fault output ( pin 20) asserted (low) . the amount of time the ic - tw8 waits for t he analog circuitry to settle ( twait ) depends on the clock fr e- quency as shown by the formula below. twait [ms] = 1048 fclock [mhz] for example, using a 32 mhz crystal, the ic - tw8 waits 33 ms for the analog circuitry to settle. out a outb outz line driver ic-tw8 e1 a1 a2 e3 e5 a3 a4 a5 a6 ic-hx 5v 3.3v vb1 vb2 vb3 vcc avdd dvdd 24v regulator regulator gndx avss/dvss
ic - tw8 16- bit sin/cos interpolator pin configuration mode aug 3 , 2016 page pc 8/ 15 copyright ?2011 2016 ic haus www.ichaus.com pin configuration in pin configuration mode , the ic - tw8 is confi g- ured by applying different voltages to configura- tion inputs c0, c1, c2 , and c3 (pins 30, 31, 32, and 33 respectively ) . each configuration input rec- ognizes 12 different voltage levels which together select one of 12 4 = 20,736 separate operational configurations for the device . the desired volta ge levels are typically set using a resistive voltage divider on each of the configur a- tion inputs as shown in figure 11 . thus, only 8 resistors are required to complet ely configure the ic - tw8. figure 11: pin configuration resistors the resistors should be located as close to the co n- figuration input pins as possible and no decoupling capacitors should be used. table 1 shows t he recommended resist o r values for setting the configuration levels. the resist o rs must be 1% (or better) tolerance to guarantee reliable operation under all conditions . configuratio n level divider ratio rx1 [k ] rx2 [k ] 11 0.87 0.00 10 0.80 3.01 12.1 9 0.73 4.02 11.0 8 0.67 4.99 10.0 7 0.60 6.04 9.09 6 0.54 6.98 8.06 5 0.46 8.06 6.98 4 0.40 9.09 6.04 3 0.33 10.0 4.99 2 0.27 11.0 4.02 1 0.20 12.1 3.01 0 0.13 0.00 table 1: pin configuration resistor values an open circuit is shown as infinite ( ) resistance and a short circuit is shown as zero resistance in table 1. c0 v dd c1 ic-tw8 v dd r01 r02 r1 1 r12 do not use decoupling caps! 1% resistors as close to ic-tw8 configuration pins as possible. c2 r21 r22 c3 r31 r32 v dd v dd avdd
ic - tw8 16- bit sin/cos interpolator pin configuration mode aug 3 , 2016 page pc 9/ 15 copyright ?2011 2016 ic haus www.ichaus.com setting the interpolation factor configura tion inputs c0 and c1 are used to select the interpolation factor . i nput c1 select s the desired interpolation group i0, i1, or i2 and input c0 selects the desired interpolation factor from within the s e- lected group . choose the desired interpolation factor from table 2 and connect the appropriate resistors to configuration input c0 (pin 30) according to t a- ble 1 to set the corresponding configuration level. c0 level inter p. group i0 interp . group i1 interp . group i2 11 x8192 1 x1600 x10000 1 10 x4096 2 x800 x5000 2 9 x2048 x400 x2500 8 x1024 x200 x1250 7 x512 x160 x1000 6 x256 x100 x500 5 x128 x80 x250 4 x64 x50 x125 3 x32 x40 x62.5 3 2 x16 x20 x25 1 x8 x10 x12.5 3 0 x4 x5 x6.25 3 table 2 : configuration input c0 the interpolation factors shown in table 2 are the number or ab output cycles per sin/cos input cy- cle. there are fou r times as many ab output edges per sin/cos input cycle than as shown in the table. note that while the ic - tw8 is a true 16 - bit interpo- lator, x 10000 is the maximum interpolation factor available in pin configuration mode. full 16 - bit (x16384) interpolation is available in serial config u- ration mode. 1 this interpolation factor can only be used with heavy filtering (c2 configuration levels 8 11) and lag recovery enabled (c3 configuration levels 6 11). 2 this interpolation factor can only be used with normal or heavy filtering (c2 configuration levels 4 11) and lag recovery enabled (c3 configuration levels 6 11). 3 z output is not synchronou s with ab outputs when using fractional interpolation factors. setting the auto-adaption mode configuration input c1 is used to select the desired auto - adaption mode and the interpolation group co r- responding to the interpolation factor selected via configuration input c0 . c hoose the desired auto - adaption mode and interpolation group from table 3 and connect the appropriate resistors to configura- tion input c1 (pin 31) according to table 1 to set the corresponding configuration level. c1 level auto - adaption mode interpolation group 11 a3: full analog and digital auto - adaption . i2 10 i1 9 i0 8 a2: full digital auto - adaption . i2 7 i1 6 i0 5 a1: digital offset and gain auto - adaption . i2 4 i1 3 i0 2 a0: no auto - adaption . i2 1 i1 0 i0 table 3 : configuration input c1 three auto - adaption modes are available in pin co n- figuration mode. mode a3 provides full analog and digi tal auto - adaption . in this mode, the ic - tw8 co n tinuously adjusts analog gain, analog offset, dig i tal offset, digital gain , and digital phase during operation to maintain optimum performance and lowest error and jitter . auto - adaption mode a2 provides full digital auto - adaption and is the recommended mode for most applications. in this mode, analog gain and offset are fixed at the values established during device ca l- ibration ( see auto calibration on page 12 ) and the ic - tw8 continuously adjusts only the digital offset, digital gain match , and digital phase during oper a- tion to maintain optimum performance and lowest error and jitter. auto - adaption mode a1 is similar to mode a2 e x- cept that digital phase is fixed at the value esta b- lished during device c alibration and not adjusted during operation. in mode a0, auto - adaption is disabled and parame- ter values are not adjusted from their initial calibr a- tion values during operation.
ic - tw8 16- bit sin/cos interpolator pin configuration mode aug 3 , 2016 page pc 10/ 15 copyright ?2011 2016 ic haus www.ichaus.com for example, to configure an interpolation factor of x80 and no auto - adaption , set c0 to configuration level 5 (r01 = 8.06k, r02 = 6.98k) and c1 to co n- figuration level 1 (r11 = 12.1k, r12 = 3.01k) . to configure an interpolation factor of x250 and full auto - adaption, set c0 to configuration level 5 (r01 = 8.06k, r02 = 6.98k) and c1 to configuration level 11 (r11 = 0). setting the filter mode and hysteresis configuration input c2 selects the amount of filte r- ing (smoothing) and the hysteresis of the ab ou t- puts of the ic - tw8. choose the desired filter mode and hysteresis from table 4 and connect the appr o- priate resistors to configuration input c2 (pin 32) according to table 1 to set the corresponding co n- figuration level. c2 level ab filter mode hysteresis ( ab edges ) 11 heavy filtering . smooth output at the expense of fast response time. 1 10 2 9 4 8 8 7 normal filtering. a good balance between smoothness and response time. 1 6 2 5 4 4 8 3 minimal filtering. outputs respond quickly to sensor inputs (and noise) . 1 2 2 1 4 0 8 table 4 : configuration input c2 the choice of filter mode is a c ompromise between fast response, smooth ness of the ab outputs , and position lag at constant speed . it is recommended to start with minimal filtering since this gives the fas t- est response of the ab outputs to changes in the sin/cos inp uts. normal or heavy filtering may be selected if the outputs are noisy or jittery. exper i- mentation may be necessary to determine the opt i- mal value. note that configuration level c2 also sets the ab output hysteresis in edges. the corresponding hyst e- resis in degrees of a sin/cos input can be calculated using the following formula. hysteresis [ ] = 90 interpolation ? hysteresis [ edges ] where i nterpolation is the interpolation factor set using configuration inputs c0 and c1. for example , if i nterpolation is set to x100 and h ystere sis is set to 2 ab edges , t he hysteresis in degrees of a sin/cos input cycle is hyteresis [ ] = 90 100 ? 2 = 1.8
ic - tw8 16- bit sin/cos interpolator pin configuration mode aug 3 , 2016 page pc 11/ 15 copyright ?2011 2016 ic haus www.ichaus.com setting the maximum ab frequency and lag recovery configuration input c3 se ts the maximum ab out- put frequency and determines whether lag recov ery is used or not . choose the desired maximum ab frequency and lag recovery setting from table 5 and connect the appropriate resistors to configuration input c3 (pin 33) according to table 1 to set the corresponding configuration level. c3 level maximum ab frequency lag recovery 11 fclock /8 lag recovery enabled. 10 fclock /16 9 fclock /32 8 fclock /64 7 fclock /128 6 fclock /256 5 fclock /8 lag recovery disabled. 4 fclock /16 3 fclock /32 2 fclock /64 1 fclock /128 0 fclock /256 table 5 : configuration input c3 in pin configuration mode, t he highest maximum output frequency of the ab outputs is fclock /8, where fclock is the clocking frequency of the ic - tw8 (see providing a clock on page 6 ). lower maximum output frequencies can be selected as shown in table 5 if devices connected to the ic - tw8 (counters, plcs, motion controllers, drives, etc.) cannot handle its full output frequency. the incremental sensor input frequency ( finput ) which c orresponds to a given ab output frequency can be calculated using the following formula : finput = ab frequency interpolation where interpolation is the interpolation factor set using configuration inputs c0 and c1. for example, if fclock = 32 mhz, an interpolation fac tor of 2500 is selected using c0 and c1, and c3 is at configuration level 8 ( fclock /64) , the maximum ab frequency will be reached at a sensor input fr e- quency of finput = 32 64 2500 = 0.0002mhz = 200hz if the incremental sensor input exceeds this freque n- cy , the ab output position can no longer keep up with the sensor position . in this case, the ic - tw8 keep s generating output pulses at the maximum ab frequency until the ab output position either catc h- es up to the sensor position or fall s behind the se n- sor position by half a sin/cos input cycle , at which point the fault output (pin 20) is activated (latched low) . this fault must be cleared by cycling power to the ic - tw8. l ag recovery can be used to eliminate most of the position lag at constant speed caused by the ab o utput filter , at the expense of possible position overshoot on stopping. with lag recovery enabled, the ab output position catches up to the sensor position during constant speed motion . however, enabling lag recovery also causes the ab output fi l- ter res ponse to become under - damped which can result in position over - and undershoot with fast sensor input position changes. this effect is worse with more ab output filtering (configuration input c2). at standstill, the ab output position is always equal to the sensor position regardless of the ab output filter and lag recovery settings. unless specifically required otherwise, it is reco m- mended to use the highest maximum ab frequency and to disable lag recovery by setting c3 to config u- ration level 5. serial interfaces the spi and 1- wire serial interface s of the ic - tw8 are fully ac tive while in pin configuration mode. it is possible to read and write to memory and observe the current configuration. however , any change s made to the configuration are only tempora ry . after cycling pow er, the configuration revert s to that set by the configuration inputs c0 c3.
ic - tw8 16- bit sin/cos interpolator pin configuration mode aug 3 , 2016 page pc 12/ 15 copyright ?2011 2016 ic haus www.ichaus.com auto calibration once the ic - tw8 has been configured using the configuration inputs, the signal path must be cal i- brated to determine proper values for gain, offset correction, gain match, and phase correction . this is most easily done us ing the auto calibration feature of the ic - tw8 to automatically determine optimum values for these parameters. auto calibration is initiated by pulling calib (pin 5) low. a pu shbutton switch connected to calib (as shown in figure 2 on page 3 ) is a n easy way to achieve this in series production. with calib held low, provide sensor input of a few hundred sin/cos cycles and the ic - tw8 tunes the analog gain, an a- log offset correction, digital offset correction, digital gain match, and digital phase co rrection parameters to provide lowest error and jitter in the interpolated ab outputs. the sensor input used for auto calibration does not need to be at a constant frequency nor must it be unidirectional. a rotary encoder can be calibrated by moving the disc or wheel back and forth a few rev o- lutions; a linear encoder by moving the sensor back and forth on the scale by a few centimeters . after providing sufficient input signals, release the calib input (it is pulled high by an internal pull - up resist or ) and the ic - tw8 i mmediately stores all ca l- ibration parameters in the external eeprom . these auto - calibrated values are then used whenever the ic - tw8 is powered up. ic -tw8 rotary encoder design tool a design tool in the form of an excel spreadsheet is a vailable to simplify configuration of the ic - tw8 in rotary encoder applications. only 10 values (in e n- gineering units) are required to completely specify the desired ic - tw8 configuration. the required configuration resistors values and performance li m- its a nd graphs are then available for implementation and characterization of the encoder. in the design tool spreadsheet, cells with a blue background are used for user entry. start by entering the operating voltage (vdd) as 5.0 or 3.3 and the frequency of the crystal you are using . the opera t- ing voltage and crystal frequency affect the current drawn by the ic - tw8, which is calculated and shown for reference. the crystal frequency also a f- fects the maximum speed and the filter response. in general, use the highe st possible frequency unless there is a need to minimize current. continue by entering the resolution of the magnetic wheel or optical disc. this value is the number of sin/cos cycles per revolution of the wheel or disc produced by the sensor connected to the ic - tw8. next enter the desired output resolution of the e n- coder as an integer equal to the number of ab c y- cles per revolution (cpr). this is also sometimes called ppr (pulses per revolution) and is equivalent to the number of lines in a non - interpol ated opt i- cal encoder. fractional output resolutions are not possible in pin - configuration mode. with the se values entered, the design tool calculates and displays the required interpolation factor . inte r- polation factors not available with the ic - tw8 (or no t selectable in pin - configuration mode) are flagged by a warning in red output resolution not possible with given input resolution! ? next, enter the desired maximum speed (speed li m- it) for the encoder in rpm. the spreadsheet calc u- lates and displays the closest speed limit that can be implemented using the ic - tw8 in pin - configuration mode. the calculated actual speed limit is shown in rpm, ab channel frequency, ab edge frequency, and as minimum time between edges. exceeding the actual speed limit activates the ic - tw8s fault output (pin 20). for an enclosed encoder the maximum speed is us u- ally dictated by the bearings used. for a modular
ic - tw8 16- bit sin/cos interpolator pin configuration mode aug 3 , 2016 page pc 13/ 15 copyright ?2011 2016 ic haus www.ichaus.com encoder (without bearings) or to use the full speed capability of the ic - tw8, enter an arbitrarily large value (such as 1 ,000,000 rpm). note that he calcu- lated actual speed limit is affected by the chosen crystal frequency and the interpolation factor used. next, enter the desired level of filtering for the ab outputs and whether lag recovery is desired. pe r- formance graphs of encoder lag in ab edges and response to a trapezoidal motion profile with co n- stant acceleration, velocity, and deceleration are displayed to allow observing the effect of the diffe r- ent filter settings. scroll to the right on small co m- puter screens to se e the performance graphs. a single parameter (maximum acceleration) is used to generate the filter response graphs. enter a value in radians per second 2 that represents the maximum expected acceleration of the encoder. the design tool calculates the equiva lent acceleration in units of krpm (1000 rpm) per second and time to reach the chosen maximum speed , which may be more easily understood . the acceleration value is used only to generate the performance graphs, it does not affect the configuration of the ic - tw8. the motion profile is generated by accelerating for 1000 adc samples at the entered acceleration, running at the attained speed for 1000 adc samples, and decelerating at the entered acceleration for 1000 adc samples. the maximum acceleration ( m ) of a motor in radi- ans per second 2 may be calculated knowing its stall torque ( s ) in newton meter s and its rotor inertia ( j r ) in kilogram meter s 2 using the formula m = s j r . for example, the maxon ec 90 flat 90w motor with the 24v winding (order number 323772) has a rotor inertia of 3,060 gcm 2 and a stall torque of 4,670 mnm. thus its no- load maximum acceleration in radians per second 2 is m = s j r = 4670 3060 ? 10,000 = 15,261 using this value f or the maximum acceleration p a- rameter in the design tool will then show the per- formance of the ic - tw8 when used in an encoder for feedback with this motor. the graphs below show typical encoder lag and m o- tion profile performance of the ic - tw8 using no r- mal filtering and lag recovery at 15,261 radians per second 2 maximum acceleration and a resolution of 16, 384 ab cycles per revolution . figure 12: typical encoder performance graphs the design tool also calculates the encoder lag in ab edges per krpm and mechanical degrees (m) of encoder rotation at the chosen maximum speed for the selected filter configuration. for a given fi l- ter and lag recovery setting, encoder lag is directly proportional to encoder speed. the design tool also calculates the position and speed overshoot due to the ab output filter. position overshoot (shown in ab edges and mechanical de- grees of encoder rotation ) is proportional to the e n- tered maximum acceleration and is typically noticed on stopping (deceleration). at low acceleration va l- ues and/or low encoder resolutions, position ove r- -50 0 50 100 150 200 250 300 350 0 2 4 6 8 10 12 14 16 18 speed (rpm) time (ms) speed profile input output -1.0 -0.5 0.0 0.5 1.0 1.5 2.0 2.5 0 2 4 6 8 10 12 14 16 18 ab edges time (ms) encoder lag
ic - tw8 16- bit sin/cos interpolator pin configuration mode aug 3 , 2016 page pc 14/ 15 copyright ?2011 2016 ic haus www.ichaus.com shoot may be less than one ab edge and thus totally undetectable during encoder operation, even with heavy filtering. speed overshoot is calculated as a perce nt of speed. speed overshoot is typically noticed at the end of the acceleration ramp (the beginning of the constant velocity portion of the motion profile). speed ove r- shoot as a percent of speed is affected only by the selected ab filter level and whether or not lag r e- covery is used. the actual amount of speed ove r- shoot in rpm is proportional to encoder speed. next, enter the desired ab output hysteresis in ab edges. the design tool calculates the equivalent hy s- teresis in degrees of a sin/cos input cycle. hyster e- sis is used to prevent instability (dithering) of the ab outputs at standstill due to noise. in general, use the lowest hysteresis that produces stable ab out- puts with no sensor motion. next enter yes or no as to whether an index sensor is used. if an index sensor is not used, the zero inputs of the ic - tw8 should be connected to avdd and avss as explained on page 5 . if an i n- dex sensor is used the width of th e z output pulse is shown. the z output pulse is always one ab edge (one quadrature state) wide in pin configuration mode. the z output is synchronous with a and b low when an integer interpolation factor is used. not using an index sensor allows higher sp eeds with high interpolation factors. enter the desired auto - adaption mode for the ic - tw8. auto - adaption refers to the ic - tw8s ability to track and change (adapt) sensor gain, offset, and phase during encoder operation to maintain low ab output error and jitter under all operating conditions. one of four auto - adaption modes can be selected and the design tool confirms which ic - tw8 para m- eters are adapted during operation. regardless of the selected mode, a uto - adaption is disabled above the displayed speed . in pin configuration mode, t he maximum auto - adaption speed is fixed and depends on the selected maximum speed, crystal frequency, and interpolation factor. at this point, the ic - tw8 configuration is complet e- ly specified and the configuration resistor value s necessary to achieve this configuration are shown. see figure 11 on page 2 for a schematic of the ele c- trical connection of the resistors to the ic - tw8. a l- so shown is a jumper map for setting the tw8_1d demo board to the selected configuration. finally, the design tool shows the conditions which activate or latch the fault ou tput (pin 20). latched faults are cleared by cycling power to the ic - tw8. pin configuration reference at power - on , the four configuration input levels (c0 c3) are read and used to set internal variables of the ic - tw8 to the proper values. other internal v ariables are also set to specific values and cannot be changed using the configuration inputs. table 6 provides a list of the internal variable values used in pin configuration mode as a reference for trouble - shooting or new applications. variables not listed in the table are set to 0. detailed information on all ic - tw8 internal variables is available in the progra m- mers reference manual . ic - tw8 variabl e value (pin configuration mode) main_cfg wp = 1 main_inter det ermined by c0 and c1. main_hyst determined by c2. main_ fltr determined by c2 and c3 . main_out start = 10 (0x 0 a) main_clock xtal = 1 div = 3 xforce = 1 main_z reset = 0 ab_cfg0 startmode = 1 ab_vtop determined by c3 . adpt_cfg determined by c1 . adpt_detail f limit = 6 tbase = 4 adpt_corr prop = 2 offtol = 2 gaintol = 2 mon_off limit = 10 mon_gain limit = 10 mon_phase lim i t = 10 flt _cfg vwarn = 1 long = 1 flt _en ee = 1 vfatal = 1 table 6 : pin configuration reference
ic - tw8 16- bit sin/cos interpolator pin configuration mode aug 3 , 2016 page pc 15/ 15 copyright ?2011 2016 ic haus www.ichaus.com ic - haus expressly reserves the right to change its products and/or specifications. an info letter gives details as to any amendm ents and additions made to the relevant current specifications on our internet website www.ichaus.com/infoletter ; this letter is generated automatically and shall be sent to registered users by email. copying even as an excerpt is only permitted with ic - haus' approval in writing and precise reference to source. ic - haus does not war rant the accuracy, completeness or timeliness of the specification and does not assume liability for any errors or omissions in these materials. the data specified is intended solely for the purpose of product description. no representations or warranties, either express or implied, of merchantability, fitness for a particular purpose or of any other nature are made hereunder with respect to information/speci fication or the products to which information refers and no guarantee with respect to compliance to the intended use is given. in particular, this also applies to the stated possible applications or areas of applications of the product. ic - haus conveys no patent, copyright, mask work right or other trade mark right to this product. ic - haus assumes no lia bility for any patent and/or other trade mark rights of a third party resulting from processing or handling of the product and/or any other use of the product. revision history date notes pages affected sept 06, 2011 first release a ll oct 24, 2011 correction of e xample s 1 and 2 p age a10 feb 21, 2012 re - format all mar 16 , 2012 re - write all april 30, 2012 minor changes for consistency with programmers reference many oct 9, 2012 table 6, changed main_servo to main_fltr 14 nov 22, 2012 formal corrections of header layout; update of disclaimer a ll jan 9, 2013 z output not synchronous with ab outputs when using fractional interpolation factors. 9, 14 dec 18, 2013 only integer output resolutions possible. 12 jan 29, 2016 1.8v eeprom. fix torque and inertia units, clarify performance graphs . main_z.reset = 0 (32 - bit position counter reset at zpos ). main_clock.xforce = 1. 5 13 14 14 aug 3, 2016 removed preliminary all
ic - tw8 16- bit sin/cos interpolator serial configuration mode aug 16 , 2016 page sc 1 / 36 copyright ?2011 2016 ic - haus http://www.ichaus.com table of contents about this document ................................ ........... 2 documentation conventions ................................ . 2 functional overview ................................ ............. 3 functional block diagram ................................ .... 4 clock generator ................................ .................. 4 power - on reset ................................ .................. 4 serial ports ................................ .......................... 4 eeprom interface ................................ ............. 4 internal memory ................................ .................. 4 ab signal path ................................ .................... 5 analog gain ................................ .................... 5 analo g offset correction ................................ 5 analog - to - digital converters (adcs) ............ 5 digital offset correction ................................ 5 digital gain match correction ....................... 5 digital phase cor rection ................................ . 6 angle calculation (arctan) ............................. 6 sensor distortion lut ................................ .... 6 filter ................................ ................................ 6 digital hysteresis ................................ ............ 8 interpolation factor ................................ ......... 8 output generator ................................ ............ 8 z signal path ................................ ....................... 8 auto calibration and auto adaption .................. 8 auto store ................................ ........................... 9 fault handling ................................ ..................... 9 adc and adaption quality monitors ................. 9 electrical connections ................................ ......... 10 providing a clock ................................ .............. 11 connecting the eeprom ................................ . 12 connecting the incremental sensor .................. 12 connecting an index sensor (if used) .............. 13 connecting the abz outputs ............................ 14 connecting the serial ports ............................... 14 power - on- reset ................................ ................. 14 startup ................................ ................................ .. 15 serial configuration overview ........................... 15 rotary encoder design tool ............................... 16 general configuration ................................ ....... 16 ab configuration ................................ .............. 18 filter configuration ................................ ........... 19 z configuration ................................ ................. 21 auto adaption configuration ............................ 21 fault pin configuration ................................ . 22 adc quality monitor ................................ ........ 23 adaption quality monitor ................................ . 24 status pin configuration .............................. 24 lut configu ration ................................ ............ 24 cfg block ................................ ......................... 24 gui hex ................................ ............................ 24 auto calibration ................................ .................. 25 auto calibration using the gui ........................ 25 calibrating the z signal path ............................. 26 no index sensor ................................ ................ 26 digital output index sensor .............................. 27 analog output index sensor ............................. 28 using serial - only output mode ......................... 30 using pwm output mode ................................ .. 31 using the post - ab divider ................................ .. 32 tuning the internal oscillator ............................ 33 using the lut ................................ ...................... 34 revision history ................................ ................... 36
ic - tw8 16- bit sin/cos interpolator serial configuration mode aug 16 , 2016 page sc 2 / 36 copyright ?2011 2016 ic - haus http://www.ichaus.com about this document this document describes the serial configuration mode of the ic - tw8 i nterpolator. serial configur a- tion mode requires configuration using the spi or 1 - wire communication ports and allows access to all the powerful features of the ic - tw8 for creating sophist icated applications. for simple applications, p in - configuration mode provides simple, static co n- figuration of the device without any programming or complicated calibration. pin config uration mode is described in a separate document. design tools for both r otary and linear encoders u s- ing the ic - tw8 are available. these tools are in the form of excel spreadsheets that allow entering a p- plication parameters in engineering units and then provide performance limits and graphs, configur a- tion register values, and c onfiguration document a- tion for the application . this greatly simplifies and speeds up the design process of encoders using the ic - tw8. documentation conventions throughout this document, hexadecimal values are written in c - style where the hex value is pre ceded by 0x. for example, 80ca 16 is written as 0x80ca. internal ic - tw8 registers are named using all capital letters. individual bits or bit groups wit h- in the register use lower case roman lettering. for example, main_cfg.wp refers to the wp bit (bit 0) in the main_cfg register at address 0x8044. likewise, main_out.mode refers to the 2 - bit group mode (bits 4 5) of register main_out at address 0x804b. see the programmers reference document for complete information on all ic - tw8 registers. derived vari ables not explicitly available as register values are shown in all lower - case italics . for e x- ample, the formula i nt e r = m a i n _i n t e r 4 shows that internal variable inter is derived from the value in the main_inter register. internal variable units - of - measure are shown in brackets following the variable name. for instance adcs [v] is the sin channel adc input level in volts.
ic - tw8 16- bit sin/cos interpolator serial configuration mode aug 16 , 2016 page sc 3 / 36 copyright ?2011 2016 ic - haus http://www.ichaus.com functional overview the ic - tw8 is a general - purpose 16 - bit sin/cos interpolat or with sophisticated auto - calibration fun c tions . it accepts 10 700mv differential analog sin/cos input signals from magnetic or optical se n- sors and calculates (interpolates) the angular pos i- tion. o utput is industry - standard incremental ab quadrature at programmable resolution . a utomatic calibra tion requires no complicated signal analysis or calibration procedure during product design or production . auto - adaption monitors and adapts p a- rameter values during operation to maintain optimal performance and low error and ji t ter. in addition to the chosen sensor, t he ic - tw8 r e- quires an external eeprom to store its configur a- tion and calibration data. an external crystal can be used instead of the internal oscillator of the ic - tw8 for superior frequency stability. a differential line driv er can be connected directly to the ic - tw8 quadrature outputs to make a complete encoder. figure 1 : ic - tw8 functional overview out a outb outz zero cos sin interpolation factor of x5 shown index pulse is suppressed as zero is low .
ic - tw8 16- bit sin/cos interpolator serial configuration mode aug 16 , 2016 page sc 4 / 36 copyright ?2011 2016 ic - haus http://www.ichaus.com functional block diagram a functional block diagram of the ic - tw8 is shown in figure 2 and explained on the following pages. figure 2 : block diagram clock generator the clock generator uses an external crystal or ot h- er clock source to generate the internal c ore clock ( fcore ) for the ic - tw8. an internal oscillator is also provided which can be used if an external crystal is not desired. the internal core clock controls all ti m- ing within the ic - tw8. power-on reset the power - on reset (por) circuit provides order ly startup of the ic - tw8 when power is applied. an external reset source can also be connected to the por to allow independent control of device startup. serial ports the ic - tw8 contains two serial ports that may be used for communication . these are a stan dard spi (serial peripheral interface) slave port and a 1 - wire port, both of which utilize the same communication protocol (see serial communication ports in the programmers reference). both ports may be used simultaneously. eeprom interface a 24xx02 thro ugh 24xx16 family i 2 c eeprom is required for storage of sensor calibration data (of f- set, gain, etc.). the eeprom connects directly to the ic - tw8 via the dedicated i 2 c eeprom i nte r- face. internal memory th e ic - tw8 provides 32k bytes of internal m emory divided into eight functional blocks that can be ac cessed by the user via either of the serial p orts. see internal memory in the programmers reference for more information. ab signal path arc- tan hyst sin+ sin cos+ cos out a outb outz adc pga pga error corr . adc analog gain analog of fset correction anti-aliasing filter digital of fset correction gain match correction phase correction lut inter analog-to-digital converters angle calculation sensor distortion correction (lookup t able) filter (servo loop) interpolation factor calculation ab/pwm output generator filter output generator digital hysteresis power-on reset clock generator adc quality monitor adaption quality monitor fault handling internal memory serial ports eeprom interface zero+ zero x8 auto calibration auto adaption auto store z comparator spi_xss spi_sclk spi_si spi_so ir wp scl sda xin xout xrst f aul t st a tus position v elocity calib z signal path delay
ic - tw8 16- bit sin/cos interpolator serial configuration mode aug 16 , 2016 page sc 5 / 36 copyright ?2011 2016 ic - haus http://www.ichaus.com ab signal path the ab signal path consists of the blocks b etween the analog pgas and the output g enerator. the front end of the ab signal p ath is shown below. figure 3 : ab signal path front end analog gain analog gain is applied to the raw sin/co s sensor inputs by two programmable gain amplifiers (pgas) with a range of 6 45 db in 3db steps. the actual analog gain, again , is determined by the p a- rameter again in the par b lock in internal memory. the same gain is applied to both channels. analog of fset correction individual analog offset correction is applied to the output of the two analog pgas this is a coarse co r- rection with a range of ?.1v in 100mv steps. the actual analog offset corrections for the sin and cos channels, aoffs and aocffc respe ctively, are dete r- mined by the paramet ers aoffs and aoffc in the par block in i n ternal m emory. the effective analog offset correction referenced to the input sin/cos signals, aoffins and aoffinc is a function of the analog gain and can be calculated as aof f i ns = aof f s agai n ?; ? aof f i nc = aof f c agai n analog -to- digital converters (adcs) the two adcs convert the conditioned analog sin and cos signals into 14 - bit digital values for further processing. the remainder of the ab signal path is completely digital. the adcs in the ic - tw8 operate best with inpu ts limited to 1.4v maximum, which corresponds to an output value of approximately 5800 adc i n- crements. above these values, adc distortion i n- creases and produces a corresponding reduction in interpolation accuracy. digital offset correction individual fin e offset correction is next applied to the digital sin and cos adc output s. a range of fine offset correction of 125mv in 244 v steps at the adc inputs is available. the actual digital offset corrections for the sin and cos channels, doffs and docffc resp ectively, are determined by the param e- t ers doffs and doffc in the par block in i nte r- nal m emory. the effective digital offset correction referenced to the input sin/cos signals can be calculated as dof f i ns = dof f s agai n ?; ? dof f i nc = dof f c agai n digital gain match correction next, digital gain match correction is applied to e i- ther the sin or cos channel to correct any mismatch between the two signal amplitudes. the actual dig i- tal gain values for the sin and cos channels, dgains and dgainc respectively, are determined by the dgain parameter in the par block in internal m emory. a range of 1.25 in steps of 0.000244 at the adc inputs is available. adc adc sin+ cos+ again analog gain aoffs aoffc analog of fset correction doffs doffc digital of fset correction dgains digital gain match correction digital phase correction dgainc dphase ?.4v max ?800 max (digital) sin output sin cos cos output
ic - tw8 16- bit sin/cos interpolator serial configuration mode aug 16 , 2016 page sc 6 / 36 copyright ?2011 2016 ic - haus http://www.ichaus.com digital phase correction lastly, phase correction is applied to the sin and cos channel s to guarantee 90 phase shift between the two signals. the actual digit al phase correction , d phase , is determined by the d ph pa rameter in the par block in internal m emory. a range of 53 in steps of 0.056 is available. angle calculation (arctan) the angle within an input cycle indicated by the conditioned digital sin and co s signals is next ca l- culated as arctan (sin/cos) with a resolution of 14 bits using a cordic algorithm. sensor distortion lut an optional 64 - byte lookup table (lut) is provided to allow correction of any remaining sensor disto r- tion (s ee using the lut on page 34) . the lut can be bypassed if not required. filter a filter is provided in the ab signal path that adds two bits of resolution to the angle calculation (gi v- ing 16 - bit angle resolution), reduce s noise and jitter in the ab outputs , and can reduce angle lag at co n- stant speed due to interpolator latency . the filter is implemented as a pi servo loop wit h feedback path delay as shown below. figure 4 : ab signal path filter the filter parameters pgain , igain , and delay are determined by variables in the main_fltr regi s- ter in the cfg block in internal m emory . the main_fltr register value necessary to realize a given filter configuration is called its instance . because of the performance tradeoffs related to the selection of the filter parameters , it is helpful to d e- fine three filter modes to make parameter selection easier. experimentation may be necessary to dete r- mine optimal filter parameters. ic - tw8 filter modes mode description p l ow - pass filter with lag . pi critically - damped l ow - pass filter with no filter lag. lag recovery under - damped low - pass filter with no filter lag and reduced latency lag. p mode is the simplest filter mode and uses only pgain ( igain = delay = 0). in p m ode, the signal path filter configuration reduces to figure 5 : p mode filter configuration in p m ode, the pgain value determines the noise and jitter bandwidth of the filter. position lag at constant sensor input velocity is directly proportional to the velocity and inversely proportional to pgain . there is no po sitio n or speed overshoot in p m ode. pgain 14 16 from lut t o hysteresis delay - igain 1 s 1 s delay pgain - 1 s
ic - tw8 16- bit sin/cos interpolator serial configuration mode aug 16 , 2016 page sc 7 / 36 copyright ?2011 2016 ic - haus http://www.ichaus.com the following p m ode filter instances 1 and appro x- imate filter bandwidths ( 3db) are available . p mode filter instances instance noise and jitter bandwidth [khz] 112 2.5 ? f c or e [ m h z ] ( m in imum lag ) 114 2.5 3 ? f c or e [ m h z ] 116 2.5 7 ? f c or e [ m h z ] 118 2.5 15 ? f c or e [ m h z ] 120 2.5 31 ? f c or e [ m h z ] 122 2.5 63 ? f c or e [ m h z ] 124 2.5 127 ? f c or e [ m h z ] ( m aximum lag ) in general, use the maximum filter bandwidth ( i n- stance 112) ; this gives the fastest response and mi n- imum filter lag. another instance may be used if additional noise and jitter filtering is required. pi mode adds igain to the p m ode filter , eliminating filter lag at constant sensor input velocity at the e x- pense of critically damped filter response. in p i m ode, the signal path filter configuration is figure 6 : p i mode filter configuration in p i m ode, filter lag at constant sensor input veloc i- ty is eliminated, but position and speed overshoot are inversely proportional to filter bandwidth. 1 the filter instance is the main_fltr register va lue necessary to realize the given filter. the following pi m ode filter instances and appro x- imate filter bandwidths ( 3db) are recommended ( instances not shown may cause unstable filter r e- sponse) . recommended pi mode filter instances instance noise and jitter bandwidth [khz] 52 2.5 7 ? f c or e [ m h z ] (minimum overshoot) 70 2.5 15 ? f c or e [ m h z ] 88 2.5 31 ? f c or e [ m h z ] 106 2.5 63 ? f c or e [ m h z ] (max . overshoot) in general, use the maximum filter bandwidth ( i n- stance 52) ; this gives the fastest response and min i- mum position and speed overshoot. another i n- stance may be used if additional noise and jitter fi l- tering is required . lag recovery mode adds delay to the feedback path of the pi m ode filter, reducing latency - induced pos i- tion lag at constant sensor input velocity at the e x- pense of under - damped filter response. in lag r eco v- ery m ode, the signal path filter configuration is as shown in figure 4 on page 6 . in l ag r ecovery m ode, position lag at constant sensor input velocity due to interpolator latency is reduced , but filter response is under - damped and position and speed overshoot are inversely proportional to filte r bandwidth. the following lag recovery mode filter instances and approximate filter bandwidths ( 3db) are recommended ( instances not shown may cause unstable filter response) . recommended lag recovery mode filter instances instance noise and jitter bandwidth [khz] 71 2.5 15 ? f c or e [ m h z ] (min . overshoot) 89 2.5 31 ? f c or e [ m h z ] 107 2.5 63 ? f c or e [ m h z ] (max . overshoot) in general, use the maximum filter bandwidth ( i n- stance 71 ); this gives the fastest response and min i- mum position and speed overshoot. another i n- stance may be used if additional noise and jitter fi l- tering is required. pgain - igain 1 s 1 s
ic - tw8 16- bit sin/cos interpolator serial configuration mode aug 16 , 2016 page sc 8 / 36 copyright ?2011 2016 ic - haus http://www.ichaus.com digital hysteresis digital hysteresis may be added to the interpolated sensor input angle to reduce ab output dithering (instability) at standstill at the expense of position error on d irection reversal. a hysteresis range of 0 22.5 of an input cycle in 0.044 steps is available. the actual hysteresis, hyst [] , is determined by the main_hyst register in the cfg b lock in internal memory. interpolation factor t he 16 - bit sensor input angle value is scaled to the resolution required by the desired interpolation fa c- tor . a range of 4 65,536 ab output edges per se n- sor sin/cos input cycle in steps of 1 edge is avail a- ble. this is equivalent to a interpolation range of x1 .00 x16,384 .00 ab output cycles per input c y- cle in steps of 0.25 ab output cycle. the actual i n- terpola tion factor , inter , is determined by the main_ inter regis ter in the cfg b lock in internal memory. output generator the output generator generates quadrature ab ou t- puts or a pulse - width modulated (pwm) bit stream output depending on the output mode. the output mode is determin ed by main_out.mode in the cfg b lock in internal m emory. the output gener a- tor also uses the conditioned zero signal from the z signal path to gener ate a z output that can be sy n- chronized to the ab outputs. the output generator contains an optional divider that can be used in ab output mode to produce fra c- tional interpolation factors. this is useful in situ a- tions where the desired output resolution i s not an integer multiple of the input resolution. z signal path the z signal path is similar to the front end of the ab signal path except that a 1 - bit adc (compar a- tor) is used. figure 7 : z signal path a fixed analog ga in of 8 is applied to the differential zero sensor input. a threshold offset is then added to the amplified zero signal to set the switching threshold of the comparator. the actual analog threshold level, zth , is d etermined by main_z in the cfg block in i n ter nal m emory and has a range of 300mv in 3 0mv steps. the effective zero input threshold therefore has a range of ?7.5mv in 3.75 m v steps. to ensure that the digital z ero signal stays in sy n- chronization with the digital sensor angle at all se n- sor speeds , a de lay matching the inherent latency of the ab signal path is introduced into the z signal path. the delayed and conditioned digital zero signal is then sent to the output generator where the z output is generated and can be synchronized to the ab outputs . auto calibration and auto adaption the ic - tw8 provides sophisticated automatic cal i- bration and adaption features to allow optimal p a- rameter values for the ab signal path to be set and maintained during operation. auto calibration is used to determine ini tial parameter values when the ic - tw8 is first commissioned. the calib input (pin 5) or commands over one of the serial interfa c- es may be used to initiate auto calibration. auto adaption is used to maintain (adapt) optimal parameter values for the ab signa l path during o p- eration. auto adaption can adjust analog gain, an a- log offset correction, digital offset correction, digital gain match, and digital phase correction to ensure maximum interpolator accuracy under all operating conditions. auto adaption is co ntrolled by variables in the adpt_corr and ad pt_detail registers in the cfg block of internal m emory. zero+ zero zth delay t o output generator zgain = 8 comparator delay match
ic - tw8 16- bit sin/cos interpolator serial configuration mode aug 16 , 2016 page sc 9 / 3 6 copyright ?2011 2016 ic - haus http://www.ichaus.com auto store the ic - tw8s auto store feature automatically stores adapted parameter values to the eeprom during operation for use as the startup value s at the next power - up. a double buffer is used which e n- sures a consistent set of ab signal path parameters at every startup. auto store is controlled by vari a- bles in the adpt_store register in the cfg block of internal memory. fault handling the ic - tw8 provides comprehensive fault handling features and a hardware fault output (pin 20) to notify external systems of faults and warnings du r- ing operation. real - time fault status is also available over the serial ports. the following signal path conditions ar e monitored and can be configured to activate the fault ou t- put. signal path fault/status conditions adc overflow adc underflow excessive adaption speed limit exceeded overspeed warning fatal overspeed fault excessive filter lag excessive ab output lag 1 - wire interface time - out external crystal fault these conditions can be monitored in real time over either of the serial ports by reading the stat_sp register in the var block in internal memory. the following eeprom conditions are monitored and can be configured to activate the fault ou t- put. eeprom fault/status conditions communication timeout hardware fault wrong eeprom id cfg block checksum error par block 0 checksum error par block 1 checksum error par_base block checksum error lut block checksum error wrong configuration mode these conditions can be monitored in real time over either of the serial ports by reading the stat_ ee register in the var block in internal memory. the conditions that activate or latch the fault output are determined by bits in the flt_cfg and flt_en register s in the cfg block in internal memory. adc and adaption quality monitors the ic - tw8 provides a sophisticated quality eval u- ation feature with a hardware status out put (pin 19) to monitor signal amplitude and auto adaption during operation. operation of the quality monitors is controlled by bits in the mon_cfg register in the cfg block in internal memory. real - time qual i- ty status is also available over the serial por ts. the adc quality monitor continuously evaluates the amplitude of the sensor signal at the output of the analog - to - digital converters in the ab signal path and provides a pulse - width modulated signal on the status output that is inversely proportional to relative signal amplitude. th us th e status ou t- put can be used to drive an led whose brightness or color is proportional to sensor signal amplitude for early warning of a possible future failure. the adc quality monitor levels are determined by var i- ables i n the mon_adc register in the cfg block in internal memory. the adaption quality monitor continuously eval u- ates the deviation of the adapted ab signal path p a- rameters from their base values and provides a pulse - width modulated signal on the status ou t- put that is proportional to the amount of deviation. thus the status output can be used to drive an led whose brightness or color is proportional to the relative amount of adaption that has occurred for early warning of a possible future failure. the ada p- t ion quality monitor levels are determined by vari a- bles in the mon_off, mon_gain, and mon_phase registers in the cfg block in inte r- nal memory.
ic - tw8 16- bit sin/cos interpolator serial configuration mode aug 16 , 2016 page sc 10/ 36 copyright ?2011 2016 ic - haus http://www.ichaus.com electrical connections the basic electrical connections for an encoder u s- ing the ic - tw8 are shown in figure 8 . other than the analog sensor, only an eeprom for parameter sto rage and a few bypass capacitors are required for operation. pinsel (pin 22) must be connected to dvss to select serial configuration mode and either the spi or 1 - wire serial ports must be connected to an appropriate master for configuration. a voltage reg ulator t o supply clean power to the device and a line driver are recom mended. a crystal or oscillator (clock driver) is recommended for all but the most cost - sensitive applications. the ic - tw8 requires a high quality ground and clean power sup plies . analog ground ( avss = pin 46) and digital ground ( dvss = pin 15) must both be connected on the pcb to a solid ground plane. analog power ( avdd = pin 38) and digital power ( dvdd = pin 21) inputs must be connected to a low impedance 5v or 3.3v power source , preferably an on- board voltage regulator . in addition, avdd and dvdd should each have a dedicated 1 f deco u- pling capacitor placed as close to the power pins on the device as possible. if the ic - tw8 is used with a line driver ( such as the ic - hd7 or ic - hx) or a high frequency fpga , it is especially important to isolate the ic - tw8 power inputs (avd d and dvdd) against external noise . in such applications, a dual voltage regulator such as the ic - dc is highly recommended. note that both avdd and dvdd must be the same volta ge level (5v or 3.3v). figure 8 : ic - tw8 electrical connections ( serial configuration mode) both pin vc (pin 44) and vref (pin 45) must be decoupled to ground with 1 f each as shown . the eeprom and the line driver (if used) must be d e- coupled according to their respective requirements. the calibration button provides an easy means to activate the auto - calibration feature of the ic - tw8 to set the data path parameters (o ffset, gain, and phase) to their optimal values. all pins not explicitly shown in figure 8 should be connected to appropr i- ate levels as indicated unde r pin functions in the ic - tw8 data sheet . vref vc 1f 1f 1f a vdd a vss vdd_tw8 1f dvdd eesel vdd_tw8 sin+ sin- cos+ cos- 10f vdd_tw8 vdd_main out a outb outz regulator line driver mr sensor ic-tw8 scl sda scl sda eeprom 24aa02 vdd_tw8 calib calibration button pinsel dvss pinsel tied to dvss for serial configuration mode eesel tied to dvss. wp wp spi_so spi_si spi_sclk spi_xss ir } spi communication port 1-wire communication port
ic - tw8 16- bit sin/cos interpolator serial configuration mode aug 16 , 2016 page sc 11/ 36 copyright ?2011 2016 ic - haus http://www.ichaus.com providing a clock the ic - tw8 supports three clocking modes as indicated in figure 9 . the ic - tw8 provides an internal oscillator that, while it can be tuned, is not particularly stable over temperature. thus, an external crystal or other clock source is reco m mended for all but the most cost - sensitive appl ic a tions. figure 9 : clocking an external crystal or oscillator provides the most stable clock signal over time and temper ature va r- iations, resulting in the most consistent long - term ic - tw8 performance. connect an external crystal to xin (pin 35) and xout (pin 34) as shown in figure 9 . depending on the crystal characteristics, two capacitors to ground might be necessary for stable oscillation. to use an oscillator or ceramic resonator, connect xin (pin 35) to ground and the oscillator output to xout (pin 34) as shown in figure 9 . maximum crystal frequency ( fclock ) is 32 mhz with 5v supplies and 24 mhz with 3.3v su p plies. minimum frequency is 6 mhz regar d less of supply voltage. to use the internal o scillator, connect both xin (pin 35) and xout (pin 34) to ground as shown in figure 9 . the ic - tw8s internal oscillator has a nominal fr e- quency of 20 mhz with 5v suppl ies and 16 mhz with 3.3v supplies and can be tuned (see page 33) . howe v- er, manufacturing tolerances and changes in temper a- ture can cause large vari a tions in the fr equency of the internal oscillator. xout xin ic-tw8 xout xin ic-tw8 xout xin ic-tw8 crystal clock inject internal oscillator
ic - tw8 16- bit sin/cos interpolator serial configuration mode aug 16 , 2016 page sc 12/ 36 copyright ?2011 2016 ic - haus http://www.ichaus.com connecting the eeprom the ic - tw8 requires a 24xx02 through 24xx16 family i 2 c eeprom for storage of sensor calibr a- tion data (offset, gain, etc.). the selected eeprom must operate down to 1.8v; the micr o- chip 24a02 is recommended. the eeprom connects directly to the ic - tw8 via a dedicated i 2 c communication channel using scl (pin 27) and sda (pin 28) as shown in fi g- ure 10 . no external pull - up resistors are required. eesel (pin 4) of the tw8 must also be connec t- ed to dvss as shown. figure 10: eeprom connection in serial configuration mode, the write protect (wp) input of the eeprom is controlled by the ic - tw8. wp must be disabled via the serial port during calibration to allow the ic - tw8 to write parameter values to the eeprom. in operation, wp can be left enabled or disabled as required by the application. con necting the incremental sensor the ic - tw8 connects directly to magnetic (such as the ic - sm2l or ic - sm5l ) or optical sensors provi d- ing differential sin/cos outputs as show n in figure 11. s ignal amplitude (a) from all four sensor channels must be in the range of 5 350mv as shown in figure 12 for proper operation with the ic - tw8. figure 11: differential sensor connection figure 12: differential sensor signal inputs sda wp 1f dvdd dvss vdd sda wp eeprom 24xx ic-tw8 scl scl 1f vdd vcc vss eesel eesel tied to dvss. sensor bridge 0 sensor bridge 1 sin+ sin- cos+ cos- ic-tw8 a vdd 0 (vdd/2) sin+ sin- a ? 5mv a 350mv 0 180 360
ic - tw8 16- bit sin/cos interpolator serial configuration mode aug 16 , 2016 page sc 13/ 36 copyright ?2011 2016 ic - haus http://www.ichaus.com single - ended sin/cos inputs can also be connec t- ed to th e ic - tw8 by connecting the sin and cos pins to the proper bias voltage as shown in figure 13 . since the ic - tw8 provides high - impedance signal inputs, a simple resis tive vol t- age divider can be used to generate the required bias voltage. for a mr sensors , it is recommen d- ed that the resistors of the bias generator match the a mr sensor bridge resistance to improve power supply noise rejection. no decoupling c a- p acitor should be used. figure 13: single - ended sensor connection differential inputs should be used whenever po s- sible to reject common mode distortions and pr o- vide increased signal ampli tude and im proved signal to noise ratio (snr). regardless of input configuration, the auto - calibration feature of the ic - tw8 is sufficient in most cases to compensate for any signal offset, gain , and phase distortions without requiring any additional exter nal components. connecting an index sensor (if used) the ic - tw8 can interface to a wide range of index sensors or gating source s to provide an index or z output which is synchronized with the ab outputs . di gi tal h all sensor s are often used for this purpose, as show n in figure 14. figure 14: digital index sensor connection digital sensors (hall, mr, and others) typically pr o- vide an active - low signal via an open - drain output that pulls low in the presence of a magnetic field. connect an active - low (open drain) digital index sensor to the ic - tw8 zero input (pin 48) and connect the zero+ input (pin 47) to a resistive voltage divider set to the midpoint of the index sensor output voltage swing to provide good noise rejection. for active - high (open source) digital index sensors, reverse the zero+ and zero connections . analog - output index sensors, such as mr bridges, can also b e used with the ic - tw8 in serial configuration mode as shown in figure 7. figure 15 : analog index sensor connection if no index (z) output is required, connect zero+ (pin 47) to ground and zero (pin 48) to avdd. sensor bridge 0 sensor bridge 1 sin+ sin- cos+ cos- ic-tw8 a vdd resistive bias generator zero+ zero- v dd ic-tw8 digital hall active low v dd ic-tw8 mr index sensor zero+ zero-
ic - tw8 16- bit sin/cos interpolator serial configuration mode aug 16 , 2016 page sc 14/ 36 copyright ?2011 2016 ic - haus http://www.ichaus.com connecting the abz outputs t he ic - tw8 provides industry - standard quadrature incremental outputs at outa (pin 18) and outb (pin 17). if an index sensor is connected to t he zero inputs of the ic - tw8, a z output synchr o- nous with the ab outputs is also available on outz (pin 16). these outputs can be directly connected to an encoder counter such as the ic-md. al ternatively, the abz outputs can be connected to a differential line driver (such as the ic - hd7 or ic - hx ) as shown in figure 16. when using a line dri v- er it is especially important to isolate the ic - tw8 from external switching n oise using a regulator, as shown . figure 16: line driver connection connecting the serial ports the ic - tw8 contains two serial ports that may be used to access internal registers for configuration. these are a standard spi (serial peripheral inte r- face) slave port and a 1 - wire port, both of which utilize the same communication protocol (see serial communication ports in the programmers refe r- ence for the protocol definition) . both ports may be used simultaneously. the spi slave port uses a 3 - wire or 4 - wire full - duplex interface which operates in cpol = 0 and cpha = 0 mode only. this means that the base (resting) value of spi _sclk (pin 27) is low, spi_si (pin 10) is sampled on the rising edge of spi_sclk, and spi_so (pin 9) is changed on the falling edge of spi_clck. when using a 4 - wire spi interface, the spi_xss input (pin 14) is used to enable the spi port when- ever communication is required. when using a 3 - wire spi interface, the spi_xss input must be tied to dvss. the 1 - wire port uses a single bi - directional data line connected to ir (pin 7) for communication. the bit stream is pulse - width modulated: a 1 - bit i s encoded as a long high level followed by a short low level, a 0- bit is encoded as a short high level followed by a long low level. a timeout circuit activates a status bit in the stat_sp register ( see programmer s reference) in the event of an illegal transaction. power-on-reset the ic - tw8 contains a built - in power - on- reset (por) circuit that controls the safe start - up of the device. the internal por can be configured for two thresholds, 2 .7v for use with 3.3v supplies or 4v, which is recommended when operating the ic - tw8 at 5v. connect xrst (pin 2) dvdd or leave it unconnected (xrst has an internal 40k pullup resistor to dvdd) to select a power - on- reset threshold of 2.7v. connect xrst to ground through a 68k resistor to select a threshold of 4v. an external reset source (such as an rc ci r cuit) can also be co n- nected to xrst (pin 2) to d i rectly control the por behavior. figure 17 : setting the power - on - reset threshold out a outb outz line driver ic-tw8 e1 a1 a2 e3 e5 a3 a4 a5 a6 ic-hx 5v 3.3v vb1 vb2 vb3 vcc avdd dvdd 24v regulator regulator gndx avss/dvss dvdd ic-tw8 xrst connect xrst to dvdd (or leave floating) for 2.7v por threshold. ic-tw8 xrst connect xrst to dvss via 68k resistor for 4v por threshold. 68k dvss
ic - tw8 16- bit sin/cos interpolator serial configuration mode aug 16 , 2016 page sc 15/ 36 copyright ?2011 2016 ic - haus http://www.ichaus.com startup in operation, the startup sequence is initiated when power is applied to the ic - tw8. however, a startup sequence can also be initiated by external hardware connected to the xrst input (pin 2), or by the r e- start command (write 0x40 to 0x80b0). see the ic - tw 8 programmers reference for more information on executing commands. after power - up, the ic - tw8s por circuit monitors the supply voltage and waits until it has reached the appropriate threshold (as determined by the xrst connections). the ic - tw8 then sta rts up using the internal oscillator (even if a crystal or external clock source is connected) and executes its start - up cycle as outlined here . 1. r ead configuration and parameter values from eeprom. 2. set proper clock source and frequency . 3. e nable the signal path . 4. wait for all analog circuitry to settle . 5. clear all errors . 6. start abz output generation . if any errors are detected during the start - up cycle, the ic - tw8 does not enable the outputs but goes into an idle state with err (pin 20) assert ed (low). the amount of time the ic - tw8 waits for the an a- log circuitry to settle ( twait ) is configured using the internal variable main_out.start. serial configuration overview in serial configuration mode, values for all config u- ration variables must be written to the tw8s inte r- nal cfg block registers before the device can be used. the easiest way to accomplish this is to use the free encoder design tools along with the ic - tw8 demo board and the free graphical user interface (gui) software. the e ncoder design tools in the form of excel spreadsheets allow entering applic a- tion parameters in engineering units and then pr o- vide configuration register values that can be direc t- ly written to the ic - tw8 using the gui software. the encoder design tools also provide per formance limits and graphs and c onfiguration documentation. the ic - tw8 tw8_1d evaluation board implements the ic - tw8 along with a 24aa02 eeprom, 24mhz crystal, and an spi interface (with 3.3v to 5v level shifter if required) to the ic - mb3u - i2c pc adapter for direct communication with the gui software. a functional prototype can thus be quickly assembled by connecting only a sensor and option al line driver. see the tw8_1d evaluation board do c- umentation for more information. once the ic - tw8 has be en configured, the ab si g- nal path must be calibrated to determine proper va l- ues for gain, offset correction, gain match corre c- tion, and phase correction. this is most easily done using the auto calibration feature of the ic - tw8 to automatically determine o ptimum parameter values. alternatively, initial parameter values may be wri t- ten over the serial interface and allowed to adapt. the adapted parameter values can then be written to the eeprom.
ic - tw8 16- bit sin/cos interpolator serial configuration mode aug 16 , 2016 page sc 16/ 36 copyright ?2011 2016 ic - haus http://www.ichaus.com rotary encoder design tool a design tool in the form of an excel spreadsheet is available to simplify configuration of the ic - tw8 in rotary encoder applications. the design tool requires answers to questions and input of desired applic a- tion specifications (in engineer ing units) to p roduce the desired ic - tw8 configuration (cfg block regi s- ter values) . these values can then be written directly to the ic - tw8 over the spi or 1 - wire serial inte r- faces to configure the device. in the design tool spreadsheet, cells with a blue background are for user entry. cells without a blue background are fixed or calculated by the sprea d- sheet and cannot be edited. depending on answers to previous questions, certain blue background cells may be labeled ignore. in this case, the entered value has no effec t on device operation. register values and internal variables calculated from user input are shown in column f or i (typically) on the spread sheets . these correlate directly to the register and variable descriptions in the ic - tw8 progra m- mers reference doc ument. when possible, legal responses to questions are pr o- vided (in parentheses). entering values other than the given responses may cause error to appear for the corresponding variable value in column h (typ i- cally) . in this case, the excel error #value ! is displayed in the corresponding cfg register in the cfg block tab. general configuration click on the general configuration tab and st art by entering the operating voltage (vdd) as 5.0 or 3.3 . if you are using an external crystal or other cl ock source (recommended), enter its frequency . the o p- erating voltage and crystal frequency affect the cu r- rent drawn by the ic - tw8, which is calculated and shown for reference. the signal path clock freque n- cy ( fcore ) which affect s the maximum encoder speed and the filter response is shown for refe r- ence. in general, use the highest possible frequency unless there is a need to minimize current. if you are not using an external oscillator or clock source, enter the desired clock divider and clock tuning value f or the internal oscillator. figure 18 : internal oscillator configuration the nominal frequency of the internal oscillator , shown for reference, depends on the operating vol t- age . the actual frequency, however, varies from unit to unit and over temperature. to compensate for this, the oscillator frequency may be reduced by a factor of 2 or 4 using the clock divider and also tuned (raised) using the cloc k tuning value (see page 33) . for initial configuration, enter the desired divider and a tuning value of 0. the resulting signal path clock frequency ( fcore ) is shown for reference. changing the clock tuning value change s the nom- inal calculated fcore . the actual fcore in any given chip with the given clock tuning value will vary from the nominal calculated value due to normal production tolerances. internal oscillator clock divider clock t uning v alue fcore
ic - tw8 16- bit sin/cos interpolator serial configuration mode aug 16 , 2016 page sc 17/ 36 copyright ?2011 2016 ic - haus http://www.ichaus.com the ic - tw8 can be configured to use pull - up and pull - down resistors on the sensor sin/cos inputs to enhance fault detection in the event of a floating sensor input. figure 19 : input pull - up resistors when input pull - ups are used and if a sensor input becomes disconnected, that input is immediately pulled to a level that cause s an adc fault (see page 9 ). if the ic - tw8 wp (write protect ) output (pin 29) is connected to the eeprom wp input (see connec t- ing the eeprom on page 12 ), then the eeprom can be configured to be locked (protected) or u n- locke d during operation. usually the eeprom should be locked during operation. to temporarily unlock the eeprom to store configu ration and ca l- ibration data , disable eeprom write protection in the miscellaneous pane of the settings tab in the ic - w8 gui software or set the unlock eeprom bit in the rb_test1 register in the rb block of internal memory using serial port command s (see progra m- mers reference) . next , enter the desired output m ode. a b is the us u- al setting and configures the ic - tw8 to produce industry - st andard ab quadrature outputs. serial and pwm are alternate output modes that are described on pages 30 and 31. ab startup mode determines how the ab outputs behave when power is applied to the ic - tw8. figure 20 : ab startup mode in relative startup mode, the a and b ou tputs are low on startup regardless of the sensor input pos i- tion (angle). in same phase startup mode, the phase relationship of the a , b , and z outputs is the same after every startup as long as the post - ab divider is not used and the actual interpolation factor , inter , is an integer . absolute burst startup mode is like same phase, except that the sensor position (angle) within one input cycle is counted out on the a and b ou t- puts at startup. same phase startup mode is the usual selection and provides opera tion similar to that of a non- interpolated encoder. enter the desired counting direction (phase rel a- tionship) for the ab outputs when sensor angle is increasing. while it may be impossible to predict the correct value during design, the counting dire c- tion can always be changed during testing to ensure correct phasing. enter the desired amount of time for the ic - tw8 to wait during startup for its analog circuitry to settle (see startup on page 14 ). the design tool returns the closest possible (actual) startup delay using the cu r- rent crystal frequency . the clock (pin 6) and frame (pin 8) outputs can be activated if necessary for special applications (see using pwm outp ut mode on page 31 ). in most cases, disable the clock and frame outputs. a vdd sin+ sin cos+ cos ic-tw8 a vss 2x 2m 2x 2m out a outb relative ab startup outz out a outb outz out a outb outz startup same phase ab startup burst ab startup
ic - tw8 16- bit sin/cos interpolator serial configuration mode aug 16 , 2016 page sc 18/ 36 copyright ?2011 2016 ic - haus http://www.ichaus.com ab configuration in the ab configuration tab , enter the input resol u- tion produced by the wheel or magnet and sensor . this value should be the number of sin/cos cycles per mechanical revolution of the wheel , magnet, or optical disc produced by the sensor connected to the ic - tw8. next enter the desired output resolution of the encoder as an integer equal to the number of ab cycles per revolution (cpr). this is also sometimes called ppr (pulses per revolution) and is equivalent to the number of lines in a non - interpolated opt i- cal encoder. fractional output resolutions are poss i- ble using the ic - tw8, but are not supported by the design tool. with the se values entered, the design tool calculates and displays the minimum required ic - tw8 inte r- p o lation factor , the minimum post - ab divider, and the effective overall interpolation factor. in most app lications, the post - ab divider is not required, and the minimum divider value should be 1. in general, this will be true if the desired output res o- lution is an integer multiple of the input resolution. specifically, minimum divider = 1 if 4 4 ? d e s i r e d?o ut put ?re s ol ut i on i nput ?re s ol ut i on 16 , 384 and 4 ? d e s i r e d?o ut put ?re s ol ut i on i nput ?re s ol ut i on ? i s ?a n?i nt e ge r . for example, wi th an input resolution of 32 sin/cos cycles per revolution, a desired output resolution of 16,384 cpr results in a minimum interpolation fa c- tor of 512 and a minimum divider of 1 since 4 ? 16,384 32 = 2048 in this case enter 1 for the divider override factor and then actual interpolation = effective i nterpol a- tion = minimum interpolation and actual output r e s- olu tion = desired output r esolution. this is the usual case. if it is desired to achieve the same output resolution using an input resolution of 24 cycles per revol u- tion, however, a minimum interpolation of 2048 and a minimum divider of 3 are required since 4 ? 16,384 24 = 2730. 66 if minimum d ivider 1 , it is not possible to sy n- chronize the z output with the states of the a and b outputs. s ee using the post - ab divider on page 32. impossible combinations of input and output resol u- tion are flagged with red warnings . next, enter the desired maximum speed (speed li m- it) for the encoder in r pm. the spreadsheet calc u- lates and displays the closest actual speed limit that can be implemented for the chosen output resolution using the current crystal . the calculated actual speed limit is shown in rpm , ab channel freque n- cy, and ab edge frequency. e xceeding the actual speed limit can be configured to activate the fault output (pin 20) . see fault configuration on page 22 for more information. for an enclosed encoder the maximum speed is us u- ally dictated by the bearings used. for a modular encoder (without bearings) or to use the full speed capability of the ic - tw8, enter an arbitrarily large value (such as 1,000,000 rpm) and the design tool will default to the highest possible speed . the calc u- lated actual speed limit is affected by the crystal frequency and output resolution . because edge separation (the time between two co n- secutive ab edges) is the reciprocal of the ab ou t- put frequency, the design tool also ca lculates this value. note that if the post - ab divider is used, the minimum edge separation at standstill (dither) is different than the minimum edge separation when running at speed. next, enter the desired maximum adaption s peed in rpm. thi s is the speed above which auto adaption of the ab signal path parameters ceases. the actual maximum adaption speed depends on the input res o- lution an d crystal frequency . in general, set the d e- sired maximum adaption speed to an arbitrarily high value (such as 1,000,000 rpm) to enable auto ada p- tion at all speeds. see auto adaption configuration on page 21 for more information. the warning fault speed depends on crys tal fr e- quency and input resolution and can be configured to activat e the fault output. the warning fault speed is always half the fatal fault speed. the fatal fault s peed is the ultimate speed limit of the ic - tw8
ic - tw8 16- bit sin/cos interpolator serial configuration mode aug 16 , 2016 page sc 19/ 36 copyright ?2011 2016 ic - haus http://www.ichaus.com at the selected input resolution using the current crystal . exceeding the fatal fault speed always act i- vates the fault output. see fault configuration on page 22 for more information. the design tool shows the resulting speed/resolution performance in a chart at columns m t. the x (resolution) axis shows the range of output resol u- tions that are possible using the selected input res o- lution. the chart shows the resulting maximum speed, maximum adaption spee d, warning fault speed and fatal fault speed at a given output resol u- tion. finally , enter the desired hysteresis in equivalent ab output edges to prevent output dithering at standstill. the design tool calculates and displays the closest possible (actual) hysteresis with the cu r- rent input and output resolution. also displayed is the equivalent hysteresis in ab output cycles, m e- chanical degrees (m) and arc - minutes of rotation, and input sin/cos cycle degrees. desired hysteresis can be less than 1 ab output edge. for best accur a- cy, choose the smallest value that produces stable ab outputs with no sensor motion . experimentation may be required to determine the optimal value . the complete range of output resolutions using the selected input resolution is shown numerically in cells b39 b41. a complete list of output resol u- tions and the corresponding interpolation factor r e- quired to achieve them is shown in the all resol u- tions tab for easy reference with respect to comple t- ed designs. for example, with an i nput resolution of 32 cycles per revolution, an output resolution of 16,384 cpr requires an interpolation factor of 512, as shown previously. using this same input resol u- tion, the all resolution tab shows that an output resolution of 10,000 is also possibl e by choosing an interpolation factor of 312.50 (row 1257). filter configuration in the filter configuration tab , enter the desired fi l- ter mode for the ab signal path filter and then enter one of the recommended filter instances. the design tool conf irms the actual filter mode and approximate noise and jitter bandwidth for the selected filter i n- stance at the current crystal frequency. if not d e- fined appears for the actual filter mode, the entered instance is not one of the recommended ones. non - reco mmended instances may cause unstable filter response. see filter on page 6 for details on filter modes and instances. the following filter modes are available. ic - tw8 filter modes mode description p low - pass filter with lag. pi criticall y - damped low - pass filter with no filter lag. lag recovery under - damped low - pass filter with no filter lag and reduced latency lag. p mode is the simplest mode ; p osition lag at co n- stant sensor input velocity is directly proportional to the sensor velocity and the filter instance value . there is no position or speed overshoot in p mode. pi mode eliminates filter lag at constant sensor i n- put velocity at the expense of criticall y damped fi l- ter response. in pi mode, filter lag at constant velo c- ity is eliminated, but position and speed overshoot are proportional to the filter instance value. lag recovery mode reduces latency - induced pos i- tion lag at constant sensor input velocity a t the e x- pense of under - damped filter response. in lag reco v- ery mode, position lag at constant velocity due to interpolator latency is reduced, but filter response is under - damped and position and speed overshoot are proportional to the filter instance valu e. in general, use the lowest instance value for the d e- sired filter type. t his gives the fastest response , mi n imum lag , and minimum position and speed overshoot . another instance may be used if add i- tional noise and jitter filtering is required. the desig n tool shows the encoder lag in ab edges per krpm and mechanical degrees (m) of encoder rotation at the chosen maximum speed for the s e- lected filter instance . for a given filter instance , lag is directly proportional to encoder speed.
ic - tw8 16- bit sin/cos interpolator serial configuration mode aug 16 , 2016 page sc 20/ 36 copyright ?2011 2016 ic - haus http://www.ichaus.com the design tool als o shows the position and speed overshoot resulting from the selected filter instance . position overshoot (shown in ab edges and m e- chanical degrees of encoder rotation) is proportional to the entered maximum acceleration and is typica l- ly noticed on stopping (deceleration). at low acce l- eration values and/or low encoder resolutions, pos i- tion overshoot may be less than one ab edge and thus totally undetectable during encoder operation . speed overshoot is calculated as a percent of speed. the actual amount of sp eed overshoot in rpm is proportional to encoder speed. speed overshoot is typically noticed at the end of the acceleration ramp (the beginning of the constant velocity portion of the motion profile). performance graphs of encoder lag in ab edges and respo nse to a trapezoidal motion profile with co n- stant acceleration, velocity, and deceleration are shown to allow observing the effect of the different filter instances . scroll to the right on small computer screens to see the performance graphs. a single parameter (maximum acceleration) is used to generate the filter response graphs. enter a value in radians per second 2 that represents the maximum expected acceleration of the encoder. the design tool calculates the equivalent acceleration in units of krpm (1000 rpm) per second and time to reach the chosen maximum speed , which may be more easily understood . the acceleration value is used only to generate the performance graphs, it does not affect the configuration of the ic - tw8. the motion profile is generat ed by accelerating for 1000 adc samples at the entered acceleration, running at the attained speed for 1000 adc samples, and decelerating at the entered acceleration for 1000 adc samples. the maximum acceleration ( m ) of a motor in rad i- ans per second 2 may be calculated knowing its stall torque ( t s ) in newton meter s and its rotor inertia ( j r ) in kilogram meters 2 using the formula m = t s j r . for example, the maxon ec 90 flat 90w motor with the 24v winding (order number 323772) has a rotor inertia of 3,060 gcm 2 and a stall torque of 4,670 mnm. thus its no- load maximum acceleration in radians per second 2 is m = t s j r = 4670 3060 ? 10 , 000 = 15 , 261 using this value for the maximum acceleration p a- rameter in the design tool will then show the pe r- formance of the ic - tw8 when used in an encoder for feedback wi th this motor. the graphs below show typical motion profile pe r- formance and encoder lag of the ic - tw8 using lag recovery filter mode instance 89 at 15,261 radians per second 2 maximum acceleration and a resolution of 16, 384 ab cycles per revolution . figure 21: typical encoder performance graphs
ic - tw8 16- bit sin/cos interpolator serial configuration mode aug 16 , 2016 page sc 21/ 36 copyright ?2011 2016 ic - haus http://www.ichaus.com z configuration in the z configuration tab, enter yes or no as to whether an index sensor is connected to the zero+ and zero inputs. if an index sensor is not used, the zero inputs o f the ic - tw8 should be connec t- ed to avdd and avss as explained on page 13 and the remaining entries on this sheet can be i g- nored. not using an index sensor allows higher speeds with high interpolation factors. if an index sensor is used , enter the desired width of the z out put pulse in ab edges . the actual z output pulse width is confi r med ; it is always equal to th e desired width unless the p ost - ab d ivider is used ( s ee page 32) or a fractional desired width is e n- tered . the design tool shows the equivalent z output pulse width in ab output cycles, mechanical d e- grees of rotation (m), arc - minutes of rotation, pre - div ider edges, and sensor input cycle degrees for reference. nex t, enter the desired polarity for the z output as either active high or active low . if the post - ab d i- vider is not used and the actual interpolation factor , inter , is an integer , the states of the a and b outputs at the beginning of the z output ( zpos ) can be e n- tered to specify the desired synchronization of the a , b, and z outputs . set both the z position ( zpos ) and desired zero threshold to 0 initially. proper values for these p a- rameters are dete rmined when the z signal path is calibrated (s ee page 26) . finally, configure t he ic - tw8s internal 32 - bit p o- s i tion counter to be reset to 0 by the z output or not at all. if on zpos is selected, the counter is reset at zpos whenever the zero out put is active. a uto a daption configuration in the auto adaption configuration tab, select which parameters are automatically adjusted (adapted) during operation to maintain low interp o- lation error and jitter. analog gain, analog offset, digital offset, digital gain match, and phase may be individually selected although there are certain d e- pendencies that cause the design tool to override the enter ed selections . in this case, a red warning is di s- played by the design tool. it is recommended to disable analog gain and offset adaption and enable only digital offset, gain match , and phase adaption during operation. in this case, analog gain and offset r emain at their calibrated se t- tings during operation . this prevents changes in a n- alog gain and offset (which can be quite large) from causing disturbances in the interpolated output du r- ing operation. a nalog gain and offset adaption may be enabled if large c hanges in sensor signal ampl i- tude or offset are expected during operation. if digital offset adaption is enabled, enter the desired digital offset tolerance and the design tool confirms the closest actual tolerance that can be achieved. digital offset tol erance is the amount of un - corrected offset that the ic - tw8 tolerates before auto adaption corrects it. small tolerance values must be used for highest accuracy, but also cause offset corrections to occur more frequently during operation and thus may lead to increased output ji t- ter. digital offsets of less than the entered tolerance are not corrected. in general, set the digital offset tolerance to the smallest value that prevents dithe r- ing of the digital offset correction value during no r- mal operation. if digital g a in match adaption is enabled, enter the desired digital gain match tolerance and the design tool confirms the closest actual tolerance that can be achieved. digital gain match tolerance is the amount of un - corrected gain mismatch between the sens or sin and cos channels that the ic - tw8 tolerates b e- fore auto adaption corrects it. small tolerance values must be used for highest accuracy, but also cause gain corrections to occur more frequently during operation and may lead to increased output jitter. digital gain mismatch of less than the entered tole r- ance is not corrected. in general, set the digital gain match tolerance to the smallest value that prevents dithering of the digital gain match correction value during normal operation.
ic - tw8 16- bit sin/cos interpolator serial configuration mode aug 16 , 2016 page sc 22/ 36 copyright ?2011 2016 ic - haus http://www.ichaus.com the correction configuration controls how the auto adaption corrections are applied to the ab signal pat h parameters during operation. first, s elect linear or exponential correction mode. linear correction mode is the recommended selection and provides the smoothest corr ection; parameter corrections are applied one increment per correction cycle. this results in the least disturbance to the interpolator output when the auto adaption corrections are made. faster correction is available in exponential corre c- tion mode which allows selection of the desired co r- rection step size. small correction steps correct 25% of the parameter error every correction cycle; med i- um correction steps correct 50% of the parameter error every correction cycle; large correction steps correct 75% of the parameter error every correction cycle. experimentation may be required to dete r- mine the optimal correction configuration. the correction timebase determines the rate at which auto adaption corrections are applied. in ge n- eral, enter 0 for the desired correction timebase and the design tool confirms the closest possible actual time base using the current crystal. this results in auto adaption corrections being applied as quickly as possible. larger timebase values provide slower response. lastly, select whether o r not the auto adapted p a- rameter values are w r itten to the eeprom during operation (a uto s tore) and used at the next restart. if auto store is enabled, enter the desired digital offset and gain match thresholds; the design tool confirms the closes t available (actual) values . these thres h- olds are the levels of change in the respective p a- rameters that must be achieved by auto adaption to cause new values to be written to eeprom. since most eeproms are only guaranteed for a finite number of write cycl es , t he se thresholds must be set high enough to minimize unnecessary eeprom writes. if auto store is di sabled, these thresholds are ignored. fault pin configuration in the fault pin configuration tab, select whether the fault output (pin 20) is active high or active low. active low is the recommended since this is the startup default of the ic - tw8. if active high is ch o- sen, the fault output will be active (high) at startup until configured to active low polarity during the startup process. the fault output can be configured to stay active for a time after a fault condition has cleared to e n- hance observation of transient fault conditions. the amount of time by which the output is prolonged is fixed and inversely proportional to crystal freque n- cy. next, choose whether or not the ab outputs should be stopped when the fault output is a c- tive. ic - tw8 fault conditions can be configured to either activate or latch the fault output. faults which do not latch the fault output only activate the fault output for the time during which the cond i- tion is active (subject to prolonging, as explained above). faults which latch the fault output are cleared at restart or may be cleared by writing to the stat_sp, stat_ee, or flt_stat registers u s- ing one of the serial ports (see programmer? refe r- ence). a crystal fault is active if the ic - tw8 is configured to use an external crystal or clock source (see page 16 ) and the expected ext ernal signal is not present. in this case, the ic - tw8 reverts to using its internal oscillator. once an external clock signal becomes available, the ic - tw8 switches back to using the external oscillator and clears the crystal fault. clea r- ing the crystal fa ult also de - activates the fault output if the crystal fault is not configured to latch. an eeprom fault is active if the eeprom has not been initialized, there is a hardware or communic a- tion problem with the eeprom, or if any of the internal checksums are invalid. it is recommended to latch eeprom faults as they can result in un - defined startup conditions. a fatal operational fault is active if the instantan e- ous sensor input velocity is greater than the fatal fault speed shown on the ab configuration tab ( see page 18), the filter lag is too large ( see page 19) , or the ab o utput is more than half an input cycle b e- hind the sensor input position due to prolonged o p-
ic - tw8 16- bit sin/cos interpolator serial configuration mode aug 16 , 2016 page sc 23/ 36 copyright ?2011 2016 ic - haus http://www.ichaus.com eration abov e the maximum speed shown on the ab configuration tab ( see page 18) . it is recommended to configure fatal operational fault s to latch the fault output as they can result in erroneous inte r- polator output. an operational warning is active if the instantaneous sensor input velocity is greater than the maximum speed or warning fault speed shown on the ab co n- figuration tab ( see page 18 ). interpolator output is still correct while an operational warning is active. m aximum speed is determ ined by the desired speed limit ( see page 18) while the warning fault speed is always half the fatal fault speed. if operational warnings are treated as faults, they can be confi g- ured to activate or latch the fault output. if o p- er a tiona l warnings are not treated as faults, they are ignored. it is recommended to configure operational warning s to be treated as faults but not to latch the fault out put so that the fault output is de - activated when the condition is resolved. an adc fault is active if the signal input level to the analog - to - digital converters in the ab signal path (see page 5 ) is outside defined operational li m- its. the upper signal le vel (called adc overflow) is fixed at 1.5v, which is 106% of the nominal signal level into the adc. the lower signal level (called adc underflow) can be set between 10% and 100% of nominal signal level or left at the default (10%) . enter the desired adc u nderflow level and the design tool confirms the closest possible (actual) level. less resolution for the adc underflow level is available if the adc quality monitor is used (see page 23 ). adc overflow and underflow faults are not fatal, but interpolation accuracy is reduced when opera t- ing under these conditions . therefore , it is reco m- mended not to latch adc faults, but to stop auto adaption when an adc fault is act ive. this prevents auto adaption from over com pensating for a n out - of - range input signal and de - activates the fault ou t- put when the input signal is back in range. if adaption faults are used, enter the desired max i- mum adaption values for offset, gain match, and phase. the design tool confirms the closest possible (actual) values. when any of these levels is excee d- ed, adaption of the corresponding parameter stops and a n adaption fault is activ at e d (see page 21 ). if adaption faults are not used, the design tool sets the adaption limits to their highest possible (actual) values to avoid ever stopping auto adaption. since an adaption fault always latches the fault outpu t and stops auto adaption if adaption faults are used , it is recommended not to use adaption faults without precise knowledge of how the parameters adapt u n- der all operating conditions. adaption faults are cleared at restart when valid startup values for t he parameters are read from the eeprom. finally, the design tool summarizes the conditions that activate the fault output, the conditions that latch the fault output , and the conditions that are ignored . latched faults are cleared by restarting the ic - tw8 or by writing to the stat_sp, stat_ee, or flt_stat registers using one of the serial ports (see programmer? reference). adc quality monitor if set adc underflow ? = no in the fault pin configuration tab, the adc quality monitor tab can be ignored in its e ntirety. if set adc underflow ? = yes in the fault pin configuration tab, use the adc quality monitor tab to enable or disable the adc quality monitor. if the adc quality monitor is not used, the remainder of the adc quality monitor tab may be ignored. if the adc quality monitor is used, enter the desired adc quality threshold level. this is the adc level in percent of nominal signal input amplitude that is considered to be the boundary between acceptable and marginal signal level for the application. the d esig n tool shows the closest possible (actual) adc quality threshold level and the desired and actual adc underflow fault levels from the fault pin configuration tab . in operation, the ic - tw8 continuously calculates the variable qm_adc as a value between 0 (adc level > adc quality threshold) and 255 (adc level adc underflow level). between the quality threshold level and the underflow level, qm_adc is inversely proportional to the adc level as shown in the design tool graph. thus, qm_adc indicates the re lative quality (signal amplitude) of the input signal. qm_adc is a component of the pwm si g- nal that drives the status output (pin 19) for e x- ternal quality monitoring; it may also be read direc t- ly from the var block in internal memory via the serial ports (see programmer? reference).
ic - tw8 16- bit sin/cos interpolator serial configuration mode aug 16 , 2016 page sc 24/ 36 copyright ?2011 2016 ic - haus http://www.ichaus.com adaption quality monitor if use adaption faults? = no in the fault pin configuration tab, the adaption quality monitor tab can be ignored in its entirety. if use adaption faults? = yes in the fault pin configuration tab, use t he adaption quality monitor tab to enable or disable the adaption quality monitor. if the adaption quality monitor is not used, the remainder of the adaption quality monitor tab may be ignored. if the adaption quality monitor is used, enter the d e- sired of fset, gain match, and phase adaption quality threshold level s . th ese levels are the cumulative amount of adaption that is considered to be the boundary between acceptable and marginal oper a- tion for the application. the design tool shows the closest possibl e (actual) quality threshold level s and the desired and actual fault levels from the fault pin configuration tab . in operation, the ic - tw8 continuously calculates the variable qm_ adapt as q m _a d a p t = m of f s + m of f c + m gai n + m phas e where moffs , moffc , mgain , and mphase are values between 0 ( total adaption < adaption quality thres h- old) and 255 ( total adaption adaption quality threshold ) of the sin channel offset, cos channel offset, gain match, and phase adaption quality mon i- tors respectively . between the quality threshold le v- el and the fault lev el, moffs , moffc , mgain , and mphase are proportional to the total cumulative amount of adaption of the respective parameter as shown in the design tool graph s . qm_ adapt is the sum of these four values and thus indicates the relative quality ( amount ) of p a- rameter adaption . qm_ adapt is a component of the pwm signal that drives the status output (pin 19) for external quality monitoring; it may also be read directly from the var block in internal memory via the serial ports (see programmers re f- erence). when q m_adapt reaches 255, an ada p- tion fault is activated. status pin configuration if neither the adc quality monitor nor the adaption quality monitor is used, the status pin config u- r a tion tab may be ignored in its entirety. if either of the quality monitors is used, use the status pin configuration tab to set the polarity and mode of the status output (pin 19). the status output is a pulse - width modulated signal whose duty cycle is proportional to the ou t- puts of the enabled quality monitors. pwm polarity de termines whether the duty cycle increases of d e- creases for an increasing value from the quality monitors while pwm mode determines whether the status output response is linear or logarithmic. logarithmic mode is useful when driving an led from the status o utput so that the intensity or color is proportional to the pwm duty cycle. the design tool graph shows the configured response. lut configuration the sensor distortion lookup table (lut) can be enabled or disabled in the lut configuration tab. if the lut is not used, the remainder of the lut co n- figuration tab may be ignored. see using the lut on page 34 for information on configuring the lut. cfg block the cfg blo ck tab shows the complete ic - tw8 configuration ( as determined by the preceding tabs ) as stored in the cfg block in internal memory (see programmers reference). cfg block register va l- ues are shown in decimal, hexadecimal, and binary as a reference for trou bleshooting. gui hex the gui hex tab shows the complete ic - tw8 co n- figuration (as determined by the preceding tabs) in the format used by the graphical user i nterface software hex editor . after using the design tool to configure the ic - tw8, type these values into the corresponding address locations in the gui hex e d- itor tab to transfer the configuration to the actual device.
ic - tw8 16- bit sin/cos interpolator serial configuration mode aug 16 , 2016 page sc 25/ 36 copyright ?2011 2016 ic - haus http://www.ichaus.com auto calibration once the ic - tw8 has been configured, the signal path must be calibrated to determine proper values for gain, o ffset correction, gain match, and phase correction. this is most easily done using the auto calibration feature of the ic - tw8 to automatically determine optimum values for these parameters. a l- ternatively, initial parameter values may be written to the para meter registers using the serial interface and allowed to adapt. the adapted parameter values must then be written to the eeprom for use after subsequent startups . auto c alibration is initiated by pulling calib (pin 5) to dvss . a pushbutton switch connect ed b e- tween calib and circuit ground (as shown in fi g- ure 8 on page 10 ) is an easy way to achieve this in series production. with calib held low, provide sensor input of a few hundred sin/cos cycles and the ic - tw8 tunes the analog gain, analog offset correctio n, digital offset correction, digital gain match, and digital phase correction parameters to provide lowest error and jitter in the interpolated ab outputs. the sensor input used for auto - calibration does not need to be at a constant frequency nor must it be unidirectional. a rotary encoder can be calibrated by moving the disc or wheel back and forth by a few revolutions; a linear encoder by moving the sensor back and forth on the scale by a few centimeters. after providing sufficient input signals, relea se the calib input (it is pulled high by an internal pull - up resistor) and the ic - tw8 immediately stores all ca l- ibration parameters in the external eeprom. these auto - calibrated values are then used for subsequent startups (see page 15). auto calibration using the gui the ic - tw8 can also be auto calibrated using the gui software instead of the calib input. with the gui running and conn ected to the ic - tw8, make sure the enable write immediately checkbox (in the lower left corner of the gui screen) is checked so that changes made in the gui are immediately wri t- ten to the chip. in the monitor tab, make sure the adc quali ty monitor enable and adapt quality monitor ena bl e checkboxes are unchecked. this disables the quality monitors so they do not interfere with initial calibration. in the signal path tab, make sure the enable co n- tinuous parameter read checkbox in the signal path pane is checked so that the parameter valu es can be observed during auto calibration. in the auto ada p- tion pane, set the adaption gain toler ance and adaption offset tolerance to their lowest values, 1.0005 (0x00) and 0.49 mv (0x00) respectively, to ensure the most accurate calibration. finally, ch eck the off/on checkbox at the top of the auto ada p- tion pane to enable auto adaption of all parameters. now, provide sensor input of a few hundred sin/cos cycles and the ic - tw8 tunes the analog gain, an a- log offset correction, digital offset correction, digital gain match, and digital phase correction parameters to provide lowest error and jitter in the interpolated ab outputs. the sensor input used for auto - calibration does not need to be at a constant fr e- quency nor must it be unidirectional. a rotary e n- coder can be calibrated by moving the disc or wheel back and forth by a few revolutions; a linear enco d- er by moving the sensor back and forth on the scale by a few centimeters. after the parameters in the signal path pane have converged, click the write e eprom button in the lower right corner of the gui screen to store all the calibrated parameter value s in the external eeprom. these auto - calibrated values are then used for subsequent startups (see page 15). after calibration, the auto adaption enable and tole r- ance parameters in the auto adaption pane of the signal path tab may be set back to their desired o p- erational values. the quality monitors may also be enabled and the thresholds and limits set as desired in the monitor tab.
ic - tw8 16- bit sin/cos interpolator serial configuration mode aug 16 , 2016 page sc 26/ 36 copyright ?2011 2016 ic - haus http://www.ichaus.com calibrating the z signal path the z signal path must be calibrated to generate a z output pulse at the proper location within a sensor input cycle and that is properly synchronized to the ab outputs. the z output is configured using the design tool, but the z signal path must be calibrated manually, if required. when the post - ab divider is not used and the interpolation factor, inter , is an i n- teger, o nce th e z signal path is calibrated, one and only one z output pulse, aligned as desired with the a and b outputs, is produced per revolution. for example, if zwidth = 1 (edge), outa is high at zpos , and outb is low at zpos , the following output synchronization results. figure 22 : abz output synchronization i f the post - ab divider is used or the actual interp o- lation, inter , is not an integer (see page 18) , the co n- figured abz output synchronization is not mai n- tained at every z output . see page 27 for info r- mation on using the z output with the post - ab d i- vi der. in general, there are three cases, depending on the type of index sensor connected to the zero inputs of the ic - tw8: 1. no index sensor. 2. digital output index sensor. 3. analog output index sensor. these three cases each are discussed separately fo l- lowing. no index sensor the simplest case is where no index sensor is used. this is useful in applications where the incremental sensor produces only one input cycle per revolution, such as with an on - axis analog hall effect device. in this case, one z outpu t is produced for every input cycle and it is only necessary to program the desired location, length, and synchronization of the z output pulse using the design tool (see page 21 ). figure 23: z output with no index sensor in the design tool z configuration tab, a nswer ?es to the ?se index sensor? question even though the zero inputs are tied to avdd and avss (see page 13) and set the desired zero threshold to 0. configure the remaining parameters as required and load the complete cfg bock to the ic - tw8 using the gui or serial p ort commands (see programmers reference) . out a outb outz sin cos 360 0 sensor input angle outz zpos zwidth out a outb 1 input cycle zpos
ic - tw8 16- bit sin/cos interpolator serial configuration mode aug 16 , 2016 page sc 27/ 36 copyright ?2011 2016 ic - haus http://www.ichaus.com digital output index sensor i n applications where the incremental sensor pr o- duces multiple input cycle s per revolution such as optical and mr magnetic sensors an index sensor must be connected to the zero in puts to qualify or ?ate the z output to ensure one and only one z output pulse per revolution . in this case, it is nece s- sary to align the z output pulse with the zero input signal and to program the desired length and sy n- chronization of the z output puls e using the design tool (see page 21 ). figure 24: z output with digital index sensor first, c onnect a digital output index sensor to the ic - tw8 as explained on page 13 . then, in the z con- figuration tab of the design tool, set the desired zero threshold to 0, configure the remaining p a- rame ters as required (see page 21) , and load the complete cfg bock to the ic - tw8 using the gui or serial port commands (see programme r? refe r- ence) . to calibrate zpos , it is necessary to observe both the z output and the internal z gating signal simultan e- ously . to observe the internal gating signal , enable index gating test mode in the test mode pane of the settings tab in the gui or set the enable z test mode bit (ztest) in the rb_test1 register in the rb block of internal memory using serial port commands (see programmers reference). this forces the internal z gating signal onto outa (pin 18), as shown following , where it can be observed using an oscilloscope. figure 25 : observing the z gating signal calibrate the z signal path by incrementing main_zpos (the zpos location within an input c y- cle) until the z output is centered within the z ga t- ing signal, as shown in figure 24 . main_zpos can be accessed using the gui or by writing to the main_zpos register in the cfg block in intern al memory via the serial ports (see programmers re f- erence). finally, disable index gating test mode in the test mode pane of the settings tab in the gui or reset the enable z test mode bit (ztest) in the rb_test1 register and then store the updated main_z pos register value to eeprom using a write all command via one of the serial ports or the write eeprom button in the gui. in general, the synchronization of the index gating signal to the sin and cos input signals is fixed. it is determined by the physical alignment of the incr e- mental and z tracks on the encoder disc or wheel and the physical alignment of the incremental and index sensors to each other. since these physical alignments cannot typically be easily adjusted, it is important that they be careful ly controlled from unit to unit to allow interchangeability of encoder wheels and sensors in series production. t o guarantee one and only one z output pulse per revolution, t he zero input signal from the index sensor must be at least as wide as the desired width of the z output pulse and no longer than two input cycles minus the width of the z output pulse under all operating conditions . specifically, z wi dt h [ ] < i nde x wi dt h [ ] < 720 ? z wi dt h [ ] where indexwidth [] is the width of the index sensor signal in input cycle degrees. sin cos 360 0 sensor input angle outz zpos zwidth out a outb 1 input cycle zpos z gating signal outz internal z pulse, once per input cycle zero+ zero delay out a
ic - tw8 16- bit sin/cos interpolator serial configuration mode aug 16 , 2016 page sc 28/ 36 copyright ?2011 2016 ic - haus http://www.ichaus.com for example, assume it is desired to have the z ou t- put pulse centered within the input cycle. in this case, zpos should be set to a nominal value of z pos [ ] = 180 ? z wi dt h [ ] 2 and the zero input signal must be approximately physically aligned ( i n - phase) with the cos input. as shown in figure 26 , the z gating signal will meet the index width requirement if its transitions fall anywhere in the gray areas of the waveform. figure 26 : digital index sensor example any deviations from ideal synchronization of the index signal to the cos signal due to production tolerances can then be compensated by adjusting the nominal zpos value, if necessary. analog output index sensor in applications where the incremental sensor pr o- duces multiple input cycles per revolution such as optical and mr magnetic sensors an index sensor must be connected to the zero inputs to qualify or ?ate the z output to ensure one and only one z output pulse per revolution. in this case, it is nece s- sary to set the switching threshold of the z signal path comparator, align the z output pulse with the z gating signal, and program the desired length and synchronization of the z output pulse using the d e- sign tool (see page 21 ). figure 27 : z output with analog index sensor first, connect an analog output index sensor to the ic - tw8 as explained o n page 13 . then, in the z configuration tab of the design tool, set the initial desired zero threshold to 0, configure the r e- maining parameters as required (see pa ge 21 ), and load the complete cfg bock to the ic - tw8 using the gui or serial port commands. to calibrate the zero threshold level, it is nece s- sary to observe the internal z gating signal. to o b- serve the internal gating signal, enable index gating test mode in the test mode pane of the settings tab in the gui or set the enable z test mode bit (ztest) in the rb_test1 register in the rb block of inte r- nal memory using serial port commands (see pr o- sin cos outz 1 input cycle zpos z gating signal 90 180 270 0 360 internal z pulse zwidth sin cos 360 0 sensor input angle outz zpos zwidth out a outb 1 input cycle zpos z gating signal
ic - tw8 16- bit sin/cos interpolator serial configuration mode aug 16 , 2016 page sc 29/ 36 copyright ?2011 2016 ic - haus http://www.ichaus.com grammers reference). this forces the internal z gating signal onto outa (pin 18), as shown follo w- ing, where it can be observed using an oscilloscope. figure 28 : observing the z gating signal set th e z comparator switching threshold, zth , by adjusting the value of main_z.th to produce a si n- gle pulse at the z gating signal output (outa) as shown . figure 29 : setting the z comparator threshold variable main_z.th can be accessed using the gui or by writing to the main_z register in the cfg block in internal memory via the serial ports (see programmers reference). analog sensors often have side lobes on their output signals as shown in figure 29 . it is important that these side lobes not cross the comparator threshold under any operating condition otherwise multiple z outputs may result. the z comparator swi tching threshold, zth , has a range of 300mv in 30 mv steps (see figure 28 ). however, since the zero input amplifier has a fixed gain of 8, the actual switching thres hold range referenced to the zero input signal level is ?7.5mv in steps of 3.75 mv. to calibrate zpos , it is necessary to observe both the z output and the internal z gating signal simultan e- ously . calibrate zpos by incrementing main_zpos (the zpos location within an input cycle) until the z output is centered within the z gating signal, as shown in figure 27. main_zpos can be accessed using the gui or by writin g to the main_zpos register in the cfg block in internal memory via the serial ports (see programmers reference). finally, disable index gating test mode in the test mode pane of the settings tab in the gui or reset the en a- ble z test mode bit (ztest) in t he rb_test1 regi s- ter and then store the updated main_zpos register value to eeprom using a write all command via one of the serial ports or the write eeprom button in the gui. in general, the synchronization the of analog index sensor signal to the sin and cos input signals is fixed. it is determined by the physical alignment of the incremental and z tracks on the encoder disc or wheel and the physical alignment of the incremental and index sensors to each other. since these phys i- cal alignments cannot typic ally be easily adjusted, it is important that they be carefully controlled from unit to unit to allow interchangeability of encoder wheels and sensors in series production. to guarantee one and only one z output pulse per revolution, the width of z gating signal as set by zth must be at least as wide as the desired width of the z output pulse and no longer than two input cycles minus the width of the z output pulse under all o p- erating conditions. specifically, z wi dt h [ ] < i nde x wi dt h [ ] < 720 ? z wi dt h [ ] where indexwidth [] is the width of the z ga ting signal in input cycle degrees. outz internal z pulse, once per input cycle zero+ zero delay out a zth z gating signal analog index sensor signal zth
ic - tw8 16- bit sin/cos interpolator serial configuration mode aug 16 , 2016 page sc 30/ 36 copyright ?2011 2016 ic - haus http://www.ichaus.com for example, assume it is desired to have the z ou t- put pulse centered within the input cycle. in this case, zpos should be set to a nominal value of z pos [ ] = 180 ? z wi dt h [ ] 2 and the analog index sensor signal must be roughly in - phase with the cos input. as shown in figure 30 , the z gating signal will meet the index width requirement if its transitions fall anywhere in the gray areas of the waveform. figure 30: analog index sensor example any deviations from ideal synchronization of the index signal to the cos signal due to production tolerances can then be compensated by adjusting the no minal zpos value, if necessary. using serial- only output mode the ic - tw8 contains a 32 - bit sensor position (a n- gle) counter that can be accessed through either of the serial ports. instantaneous sensor velocity can also be accessed via the serial port s. while the serial ports can be used to read position and velocity in all output modes, serial - only output mode removes the maximum ab output frequency limit, fab , allowing higher sensor speeds. enter serial for the output mode in the general configuratio n tab of the design tool and the a, b, and z outputs are disabled. serial - only output mode is not explicitly handled in the design tool, although the design tool may still be used for ic - tw8 configuration. see the ic - tw8 programmers reference for informa tion on the s e- rial ports, the 32 - bit position variable pos, and the sensor velocity variable vel in the wm block in internal memory. the 32 - bit position is updated at the adc sampling clock frequency, fadc . f adc = f c or e 128 to avoid jitter and aliasing when making continuous position reads, the adc sampling frequency and the spi sampling frequency must be synchronized e x- ternally. this can be accomplished either by sy n- chronizing the ic - tw8 to the external cpu that handles spi communication with the tw8 or by synchronizing the cpu to the ic - tw8. to synchronize the ic - tw8 to an external cpu, the cpu must generate a signal derived from its own clock to drive the ic - t w 8s clock input (pin xout). the cpu must then read the 32 - bit po sition from the ic - tw8 at an integer divisor of fadc . to synchronize an external cpu to the ic - tw8, set main_cfg.clockout = 1 to output the adc sa m- pling clock on the frame pin . this signal can then be used as an interrupt to the cpu to trigger an spi posi tion read. alternatively, the ic - tw8s dsm clock on the clock output pin can be used to d i- rectly clock the external cpu. in this case, the cpu must then read the 32 - bit position from the ic - tw8 at an integer divisor of fadc . zwidth sin cos outz 1 input cycle zpos z gating signal 90 180 270 0 360 internal z pulse zth analog index sensor signal
ic - tw8 16- bit sin/cos interpolator serial configuration mode aug 16 , 2016 page sc 31/ 36 copyright ?2011 2016 ic - haus http://www.ichaus.com using pwm output mode as an alternative to the standard ab quadrature ou t- put, the ic - tw8 can provide a pulse - width mod u- lated ( pwm ) output proportional to sensor angle. this is useful as a direct digital interface between the interpolator and a subsequent microcontroller or fpga in im bedded control applications. note that the pwm output is generated using a delta - sigma modulator so the signal does not look like a tradition pwm waveform. the interpolation factor inter must be less than or equal to 1024 in pwm output mode. enter pwm for the output mode in the general configuration tab of the design tool. the a and b outputs (pins 18 and 17 respectively) become the differential pwm output; the z output (pin 16) r e- mains unchanged. figure 31 : pwm output mode selec ting pwm output mode in the design tool r e- veals the pwm configuration selections. enter the desired frequency for the pwm output; the design tool shows the closest actual frequency available using the selected crystal. finally, select whether the pwm outpu t is clamped or not. figure 32 : pwm output clamp the typical configuration is not clamped, in which case the pwm output duty cycle represents the a n- gle of the sensor sin/cos inputs over multiple input cycles. the clamped configur ation is useful for si n- gle - turn absolute applications where there is only one sin/cos input cycle per revolution. an external first or second order low - pass filter can be used to convert the pwm output to a voltage, which in turn can be sampled by an adc. since the pwm output is generated by a first order delta - sigma modulator (dsm) , a second order filter is recommended . however, a first order a nalog rc filter may be suf ficient in simple applications . figure 33 : analog low - pass pwm filter alternatively , the pwm output can be directly sa m- pled and digitally filtered by a micro controller . fpga , or pld . in this case, enab le the clock and frame outputs in the general configuration tab of the design tool. the clock output (pin 6) can then be used to synchronously sample the pwm output . figure 34 : digitally sampling the pwm output this allows a n all - digital decimation filter to be i m- plemented. since a first order dsm is used to ge n- erate the pwm output, a second order restructuring filter is required for best signal - to - noise perfo r- mance . as with the analog filter, however , a first order filter ma y be sufficient for many applications. pwm+ pwm outz ic-tw8 out a outb outz sin cos 1 input cycle pwm output (not clamped) 90 180 270 0 360 100% 0% pwm output (clamped) 100% 0% 180 90 0 270 adc microcontroller with built-in adc r c ic-tw8 out a outb outz gp input gp input microcontroller , fpga, or pld ic-tw8 out a clock outz
ic - tw8 16- bit sin/cos interpolator serial configuration mode aug 16 , 2016 page sc 32/ 36 copyright ?2011 2016 ic - haus http://www.ichaus.com using the post- ab divider the ic - tw8 includes an optional divider after the internal ab output generation that can be used to reduce (divide) the configured resolution by a factor of 1 32. this post - ab divider is useful when the desired output resolution is not an integer multiple of the input resolution. figure 35 : post - ab divider when using the rotary encoder design tool to co n- figure the ic - tw8, the post - ab divider is automat i- cally ena bled if necessary. the ab configuration tab in the design tool calculates the minimum divi d- er necessary to achieve the desired output resolution using the configured input resolution. this min i- mum value may be overridden if necessary by ente r- ing a divider override factor. as shown in figure 35 , the z output bypasses the post - ab divider. therefore, any configured sy n- chronization of the z output to the a and b outputs is lost when using the post - ab divider. for example, with an input resolution of 24 sin/cos cycles per revolution, it is impossible to achieve an output resolution of 16,384 ab cycles per revol u- tion (cpr) without the post - ab divider since 4 ? 16384 24 is not an integer (see page 18 ). ho w- ever, entering these values into the design tool gives a minimum divider value of 3 and an effective i n- terpolation, intereff , of 682.66667. thus, an output resolution of 16,384 cpr is possible with an input resolution of 24 by using the post - ab divider. note that the maximum speed and maximum ada p- tion speed are inversely proportional to the post - ab divider value. higher post - a b divider values pr o- duce lower maximum speed and maximum adaption speed. these speed values are shown in the ab configuration tab of the design tool. the post - ab divider is also useful to allow a co m- plete range of output resolutions to be achieved u s- ing a single input resolution. for example, with an input resolution of 128 sin/cos cycles per revol u- tion, only binary output resolutions can be achieved without using the post - ab divider. as shown in cell b49 of the ab configuration tab of the design tool, res olutions between 128 and 2,097,152 cpr in i n- crements of 32 cpr can be achieved with this co n- figuration. the actual resolutions available in this configuration (128, 160, 192, 224, 256, etc.) are shown in the all resolutions tab in the design tool. enterin g a divider override factor of 16 in this co n- figuration provides an actual divider of 16 and r e- duces the resolution increment to 2 cpr. now, all even resolutions between 8 and 131,072 cpr may be achieved. increasing the divider override factor to 32 allows all integer resolutions (4, 5, 6, 7, 8, etc.) between 4 and 65,536 to be achieved using an input resolution of 128 sin/cos cycles per revol u- tion. post-ab divider ab generator out a outb divide by 2 shown. outz
ic - tw8 16- bit sin/cos interpolator serial configuration mode aug 16 , 2016 page sc 33/ 36 copyright ?2011 2016 ic - haus http://www.ichaus.com tuning the internal oscillator the ic - tw8s internal oscillator has a nominal fr e- quency of 20 mhz with 5v supplies and 16 mhz with 3.3v supplies. however, manufacturing tole r- ances and changes in temperature can cause large variations in the actual internal oscillator frequency of any given device. the clock tuning value in the main_clock.freq vari able allows tuning the frequency of the internal oscillator. in addition, the clock divider value in the main_clock.div variable allows dividing the oscillator frequency by 1, 2, or 4. these two para m- eters allow setting the internal oscillator of any sp e- ci fic device to the desired frequency. the main_clock register can be accessed using the serial ports (see programmers reference) or via the settings tab in the gui. to observe the internal oscillator output, enable i n- ternal oscillator test mode in the test mode pane of the settings tab in the gui or set the enable clock test mode bit (adctest) in the rb_test1 register in the rb block of internal memory using serial port commands (see programmers refe r- ence). this forces fcore /2 onto the frame output (pin 8) , as shown below, where it can be observed using an oscilloscope or a frequency counter. figure 36 : internal oscillator tuning first, set the clock divider to the desired value, us u- ally 1 (main_clock.div = 3), and the clock tu n- ing value to its lowest value (main_clock.freq = 0). increment the clock tuning value until the d e- sired oscillator frequency is obtained, remembering that the output frequency on the frame pin is half the actual oscillator frequency. finally, disable i n- ter nal oscillator test mode in the test mode pane of the settings tab in the gui or reset the enable clock test mode bit (adctest) in the rb_test1 register and then store the updated main_clock register value to eeprom using a write all co m- mand via one of the serial ports or the write eeprom button in the gui. typical internal oscillator frequency of the ic - tw8 with 5v supplies and a clock divider of 1 at room temperature (20c) is shown below. other clock divider values produce appropriately scaled - down frequ encies. typical internal oscillator frequency clock tuning value frame output frequency [mhz] fcore frequency [mhz] 0 10.6 21.2 1 11.0 22.0 2 11.5 23.0 3 11.9 23.8 4 12.5 25.0 5 13.0 26.0 6 13.6 27.2 7 14.3 28.6 8 15.1 30.2 9 15.8 31.6 10 16.8 33.6 11 17.7 35.4 12 18.9 37.8 13 20.2 40.4 14 21.6 43.2 15 23.3 46.6 note that the nominal oscillator frequency is achieved with a clock tuning value of 0 and that the range of the clock tuning value allows setting the internal oscillator frequency above the maximum allowed for proper operation of the device (shown in red ). setting the internal oscillator frequency higher than the specified maximum may result in undefined operation. in general, set the internal oscillator frequency as close to but not greater than the maximum fr e- quency for the supply voltage used (32 mhz at 5v, 24mhz at 3.3v). the temperature coefficient of the internal oscillator is negative, so oscillator freque n- cy decreases with rising temperature and increases with decreasing temperature. in applications where low temperature operation is expected, the ro om internal oscillator clock divider clock t uning v alue fcore main_clock.div main_clock.freq frame ?
ic - tw8 16- bit sin/cos interpolator serial configuration mode aug 16 , 2016 page sc 34/ 36 copyright ?2011 2016 ic - haus http://www.ichaus.com temperature oscillator frequency should be reduced accordingly. see electrical characteristics in the ic - tw8 data sheet for the actual value of the oscill a- tors temperature coefficient. using the lut the ic - tw8 contains a 64- byte sensor distortion look - up table (lut) that can be used to apply an arbitrary correction function to the calculated sensor position (angle) . to use the lut, the correction values must first be calculated and loaded into the table using the design tool, the gui software , or commands sent via the serial ports . then the lut must be enabled by setting adpt_cfg.lut = 1 in the cfg block in internal memory. when the lut is enabled, the maximum spi port clock frequency is reduced to fcore /4. if adpt_cfg.lut = 0, the lut is bypass ed and no correction is applied. figure 37 : sensor distortion lut the lut divides the sensor sin/cos input cycle into 64 segments of 5.625 each and the table values d e- fine a 64 - point piecewise linear correction curve. correction values for sensor angles within a lut table segment are linearly interpolated between the two table values on either end of the segment. in operation, the calculated correction value is added to the sensor angle. lut table values have a range of 127 . t he actual correction applied to the 14 - bit sensor angle is 4 times the table value, giving the lut a correction range of 4 ? 127 16384 ? 360 = 11.16 the resolution of the lut values is 4 16384 ? 360 = 0.088 = 5.3? a r c ?m i nut e s the simplest lut is a null table, where all values are zero. this is equivalent to bypassing the lut and applies no correction to the sensor signal , but serves as a starting point for understanding lut operation . figure 38 : null lut a constant lut is one in whic h all the values are the same. this adds a constant phase shift to the sensor angle, shifting the 0?position left for positive lut values and right for negative values. a t an lut sin cos adpt_cfg.lut 0 1 14-bit sensor position (angle) 14-bit corrected sensor position (angle) sin cos 360 0 sensor input angle 1 input cycle 360 0 lut output angle 0 127 ?27 lut v alues
ic - tw8 16- bit sin/cos interpolator serial configuration mode aug 16 , 2016 page sc 35/ 36 copyright ?2011 2016 ic - haus http://www.ichaus.com figure 39 : constant lut a constant lut is useful in single turn absolute a p- plications such as synchronous ac motor commut a- tion where the feedback signal must be aligned to the motor poles. for example, to shift the interpol a- tor 0 position 3.8 to the right, the constant lut value is calculated as ? 3.8 360 ? 16384 4 = ? 43 more complex luts require careful fft measur e- ment of sensor distortion. when sensor distortion harmonics are known, the design tool can be used to calculate a lut that corrects for up to two sensor harmonics whi ch are identical on both sin and cos input channels . in the lut configuration tab of the design tool, enter up to two sensor distortion harmonic to be co r- rected. the harmonic number, amplitude in percent, and phase in degrees are required. to correct for only one distortion harmonic enter 0 amplitude for the un used harmonic. the design tool shows the r e- sultant angular error due to the distortion and the residual error left after correction. the residual a n- gular error is due to the finite (8 bit) resolution of the lut. for example, if fft analysis of a particula r sensor showed 2 % second harmonic distortion at 0 phase shift and 1 % third order harmonic distortion at 180 phase shift, the following angular error results. figure 40 : sensor distortion the design tool shows that this sensor distortion produces peak angular error of 1.88 input cycle d e- grees. after correction by the lut, 0.04 (15.76 arc minutes) of angular error remain. the gui lut tab in the design tool shown the ca l- culated lut as a graph and lut values. save the gui lut tab as a .csv file for direct import into the gui software. the lut entries are also copied into the gui hex tab of the design tool. sin cos 360 0 sensor input angle 1 input cycle lut output angle 0 127 ?27 lut v alues
ic - tw8 16- bit sin/cos interpolator serial configuration mode aug 16 , 2016 page sc 36/ 36 copyright ?2011 2016 ic - haus http://www.ichaus.com ic - haus expressly reserves the right to change its products and/or specifications. an info letter gives details as to any amendm ents and additions made to the relevant current specifications on our internet website www.ichaus.com/infoletter ; this letter is generated automatically and shall be sent to registered users by email. copying even as an excerpt is only permitted with ic - haus' approval in writing and precise reference to source. ic - haus does not warrant the accuracy, completeness or timeliness of the specification and does not assume liability for any err ors or omissions in these materials. the data specified is intended solely for the purpose of product descr iption. no representations or warranties, either express or implied, of merchantability, fitness for a particular purpose or of any other nature are made hereunder with respect to information/speci fication or the products to which information refers and no guarantee with respect to compliance to the intended use is given. in particular, this also applies to the stated possible applications or areas of applications of the product. ic - haus conveys no patent, copyright, mask work right or other trade mark righ t to this product. ic - haus assumes no liability for any patent and/or other trade mark rights of a third party resulting from processing or handling of the product and/or any other use of the product. revision histor y date notes pages affected april 19, 2012 first release all april 30, 2012 added sections from calibrating the z signal path to end. 26 35 nov 22, 2012 formal corrections of header layout; update of disclaimer all jan 9, 2013 z output can only be synchronized to ab outputs if post - ab divider not used and inter is an integer. reference gui test modes in calibrating the z signal path and tuning the internal oscillator sections, etc. 17, 18, 21 17, 27, 29, 33 dec 18, 2013 fractional output resolutions not supported by the design tool. added minimum edge separation information. added auto calibration using the gui section. 18 18 25 jan 29, 2016 main_z.th has 30mv steps . 1.8v eeprom . fix torque and inertia units, clarify performance graphs . serial - only output mode requires synchronization for low jitter. fig 32: pwm output is 50% at 0. also inter 1024 for pwm output. 8, 29 12 20 30 31 aug 3, 2016 removed preliminary all aug 16, 2016 32- bit counter can only be reset by z output. 21


▲Up To Search▲   

 
Price & Availability of IC-TW8-16

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X